home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best of Shareware
/
Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso
/
mac
/
ZIPPED
/
DOS
/
EDITORS
/
BE300.ZIP
/
BINGO.DOC
< prev
next >
Wrap
Text File
|
1992-10-18
|
336KB
|
8,767 lines
The Bingo Programmer's Text Editor
A Shareware Product
Version 3.00
Reference Manual
Copyright 1989,1992
Christopher R. S. Schanck
October 17, 1992
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
Table of Contents
-----------------
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Philosophy . . . . . . . . . . . . . . . . . . . . . . . . . 2
The Association of Shareware Professionals . . . . . . . . . 4
The Shareware Concept and Registering . . . . . . . . . . . 5
Ordering Direct & PsL Shareware Registration . . . . . . . . 6
Things to Possibly Come . . . . . . . . . . . . . . . . . . 7
Support . . . . . . . . . . . . . . . . . . . . . . . . . . 8
CompuServe . . . . . . . . . . . . . . . . . . . . . . . . . 9
Getting the Latest Version . . . . . . . . . . . . . . . . . 10
Using this Manual . . . . . . . . . . . . . . . . . . . . . 11
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Installing Bingo . . . . . . . . . . . . . . . . . . . . . . 12
BOPTS: The External Config Utility . . . . . . . . . . . . . 13
# of Buckets & Bucketsize . . . . . . . . . . . . . . . 13
Chess Stack Size . . . . . . . . . . . . . . . . . . . 13
Chess # of Variables . . . . . . . . . . . . . . . . . 13
Chess # of Functions . . . . . . . . . . . . . . . . . 13
Scramble Registration Name . . . . . . . . . . . . . . 14
Bingo & Virtual Memory . . . . . . . . . . . . . . . . . . . 15
Impact of Virtual Memory on Performance . . . . . . . . 15
KEYCFG: The Keyboard Configuration Program . . . . . . . . . 17
Key Names . . . . . . . . . . . . . . . . . . . . . . . 17
Section 1 -- Key Assignments . . . . . . . . . . . . . 19
'open_end' Key Identifier . . . . . . . . . . . . 20
'cur_file' Key Identifier . . . . . . . . . . . . 21
'interpret' Function Identifier . . . . . . . . . 21
Section 2 - Chess Code . . . . . . . . . . . . . . . . 21
KEYCFG Command Line Options . . . . . . . . . . . . . . 21
The KEYINFO Key Information Utility . . . . . . . . . . . . 22
Starting Bingo . . . . . . . . . . . . . . . . . . . . . . . 23
The BINGO.INI file . . . . . . . . . . . . . . . . . . . . . 24
Bingo and Larger Screen Displays . . . . . . . . . . . . . . 25
Bingo's Menu System . . . . . . . . . . . . . . . . . . . . 26
Bingo's User Interface . . . . . . . . . . . . . . . . . . . 27
String Entry Boxes . . . . . . . . . . . . . . . . . . 27
Yes/No Boxes . . . . . . . . . . . . . . . . . . . . . 28
Non-Editable Display Boxes . . . . . . . . . . . . . . 29
List-Picking Boxes . . . . . . . . . . . . . . . . . . 29
Directory Lister . . . . . . . . . . . . . . . . . . . . . . 30
Bingo and File Names . . . . . . . . . . . . . . . . . . . . 31
The Status Line . . . . . . . . . . . . . . . . . . . . . . 32
Bingo & The Mouse . . . . . . . . . . . . . . . . . . . . . 33
The Mouse Cursor . . . . . . . . . . . . . . . . . . . 33
The Mouse at the General Editing Level . . . . . . . . 33
The Mouse and The Menus . . . . . . . . . . . . . . . . 35
The Mouse & Dialogue Boxes . . . . . . . . . . . . . . 36
String Entry Boxes . . . . . . . . . . . . . . . . 36
Yes/No Boxes . . . . . . . . . . . . . . . . . . . 36
Non-Editable Display Boxes . . . . . . . . . . . . 36
List-Picking Boxes . . . . . . . . . . . . . . . . 36
The Mouse and The ASCII Table . . . . . . . . . . . . . 37
Bingo Function Summary . . . . . . . . . . . . . . . . . . . . . 39
Configuring Bingo . . . . . . . . . . . . . . . . . . . . . 40
Function List . . . . . . . . . . . . . . . . . . . . . 40
Basic Editing . . . . . . . . . . . . . . . . . . . . . . . 49
The Destructive Backspace . . . . . . . . . . . . . . . 49
The 'Default_' Functions . . . . . . . . . . . . . . . 49
Function List . . . . . . . . . . . . . . . . . . . . . 49
Block Handling . . . . . . . . . . . . . . . . . . . . . . . 52
Marking . . . . . . . . . . . . . . . . . . . . . . . . 52
Operations on Blocks . . . . . . . . . . . . . . . . . 52
Named Buffers . . . . . . . . . . . . . . . . . . . . . 53
Emacs_yank . . . . . . . . . . . . . . . . . . . . . . 53
Function List . . . . . . . . . . . . . . . . . . . . . 53
Error Parsing and Undo . . . . . . . . . . . . . . . . . . . 57
How Error Parsing Works . . . . . . . . . . . . . . . . 57
Error Parsing Method . . . . . . . . . . . . . . . . . 57
Undo Capabilities . . . . . . . . . . . . . . . . . . . 58
Manipulating the Undo Stack . . . . . . . . . . . . . . 58
Function List . . . . . . . . . . . . . . . . . . . . . 59
File Handling . . . . . . . . . . . . . . . . . . . . . 60
Function List . . . . . . . . . . . . . . . . . . . . . 60
Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Function List . . . . . . . . . . . . . . . . . . . . . 63
Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Macro Space . . . . . . . . . . . . . . . . . . . . . . 64
Defining Macros . . . . . . . . . . . . . . . . . . . . 64
Ending Macro Definition . . . . . . . . . . . . . . . . 64
Saving Macros . . . . . . . . . . . . . . . . . . . . . 64
Saving the Entire Key Set . . . . . . . . . . . . . . . 65
Executing a Macro File . . . . . . . . . . . . . . . . 65
Function List . . . . . . . . . . . . . . . . . . . . . 65
Navigation . . . . . . . . . . . . . . . . . . . . . . . . . 67
Function List . . . . . . . . . . . . . . . . . . . . . 67
System Operations . . . . . . . . . . . . . . . . . . . . . 71
Simple Execution & Shelling . . . . . . . . . . . . . . 71
Swap Execution & Shelling . . . . . . . . . . . . . . . 71
Function List . . . . . . . . . . . . . . . . . . . . . 71
Printing . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Function List . . . . . . . . . . . . . . . . . . . . . 73
Searching . . . . . . . . . . . . . . . . . . . . . . . . . 74
Regular Expression Search & Replace Examples . . . . . 75
Function List . . . . . . . . . . . . . . . . . . . . . 76
Utilities . . . . . . . . . . . . . . . . . . . . . . . . . 78
Function List . . . . . . . . . . . . . . . . . . . . . 78
Windows . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Window_vertical . . . . . . . . . . . . . . . . . . . . 81
Window_one & Window_zoom . . . . . . . . . . . . . . . 81
Function List . . . . . . . . . . . . . . . . . . . . . 81
Extra Functions . . . . . . . . . . . . . . . . . . . . . . 84
Pick & Exec . . . . . . . . . . . . . . . . . . . . . . 84
Quit and Save Status . . . . . . . . . . . . . . . . . 84
Repeat_last . . . . . . . . . . . . . . . . . . . . . . 84
Box Draw Mode . . . . . . . . . . . . . . . . . . . . . 84
Cmd_line . . . . . . . . . . . . . . . . . . . . . . . 85
Function List . . . . . . . . . . . . . . . . . . . . . 85
Chess: The Language . . . . . . . . . . . . . . . . . . . . . . . 88
Introduction . . . . . . . . . . . . . . . . . . . . . . . . 88
Things to Possibly Come . . . . . . . . . . . . . . . . . . 89
The Body of a Chess Program . . . . . . . . . . . . . . . . 90
Variables and Constants and Comments . . . . . . . . . . . . 91
Integers and Characters: . . . . . . . . . . . . . . . 91
Constants: . . . . . . . . . . . . . . . . . . . . . . 91
Comments: . . . . . . . . . . . . . . . . . . . . . . . 92
Arrays and Pointers . . . . . . . . . . . . . . . . . . . . 93
Arrays: . . . . . . . . . . . . . . . . . . . . . . . . 93
Pointers: . . . . . . . . . . . . . . . . . . . . . . . 93
Operators & Expressions . . . . . . . . . . . . . . . . . . 96
Operators . . . . . . . . . . . . . . . . . . . . . . . 96
Expressions . . . . . . . . . . . . . . . . . . . . . . 97
Program Statements . . . . . . . . . . . . . . . . . . . . . 98
IF . . . . . . . . . . . . . . . . . . . . . . . . . . 98
IF-ELSE . . . . . . . . . . . . . . . . . . . . . . . . 98
WHILE . . . . . . . . . . . . . . . . . . . . . . . . . 99
RETURN . . . . . . . . . . . . . . . . . . . . . . . . 99
BREAK . . . . . . . . . . . . . . . . . . . . . . . . . 99
Compound Statements . . . . . . . . . . . . . . . . . . 100
User Functions . . . . . . . . . . . . . . . . . . . . . . . 101
An Example Chess Program . . . . . . . . . . . . . . . 101
Declaration . . . . . . . . . . . . . . . . . . . . . . 101
Variable Scope . . . . . . . . . . . . . . . . . . . . 103
The Rules of Scoping . . . . . . . . . . . . . . . . . 103
Library Functions . . . . . . . . . . . . . . . . . . . . . 104
Using Chess From Within Bingo . . . . . . . . . . . . . . . . . . 105
Chess Code in a *.CFG File . . . . . . . . . . . . . . . . . 105
Attaching Chess Functions to Keystrokes . . . . . . . . . . 106
The Chess Command Line in Bingo . . . . . . . . . . . . . . 106
Attaching Chess Functions to Profile Files . . . . . . . . . 106
Running a Chess File on Startup . . . . . . . . . . . . . . 107
Order of Execution on Startup . . . . . . . . . . . . . . . 107
Debugging Chess Programs . . . . . . . . . . . . . . . . . . 107
Library Function Reference . . . . . . . . . . . . . . . . . . . 108
Ask . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Atoi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
B_cmd . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Beep . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Box_pick . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Get_str . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Get_yesno . . . . . . . . . . . . . . . . . . . . . . . . . 110
Get_char . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Get_curr_text . . . . . . . . . . . . . . . . . . . . . . . 110
Get_fname . . . . . . . . . . . . . . . . . . . . . . . . . 111
Get_text . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Getkey . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Itoa . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Memcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Msg . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Pick_file . . . . . . . . . . . . . . . . . . . . . . . . . 112
Put_char . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Put_text . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Put_text_curr . . . . . . . . . . . . . . . . . . . . . . . 113
Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Sformat . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Str . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Strcat . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Strcmp . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Strcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Strlen . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Strndx . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Update_display . . . . . . . . . . . . . . . . . . . . . . . 116
Valid_name . . . . . . . . . . . . . . . . . . . . . . . . . 116
"Ask" Arguments . . . . . . . . . . . . . . . . . . . . . . . . . 117
File_autoindent . . . . . . . . . . . . . . . . . . . . . . 117
File_bspace . . . . . . . . . . . . . . . . . . . . . . . . 117
File_changes . . . . . . . . . . . . . . . . . . . . . . . . 117
File_cmode . . . . . . . . . . . . . . . . . . . . . . . . . 117
File_column . . . . . . . . . . . . . . . . . . . . . . . . 118
File_dialogue . . . . . . . . . . . . . . . . . . . . . . . 118
File_dirty . . . . . . . . . . . . . . . . . . . . . . . . . 118
File_id_no . . . . . . . . . . . . . . . . . . . . . . . . . 118
File_in_mark . . . . . . . . . . . . . . . . . . . . . . . . 118
File_insmode . . . . . . . . . . . . . . . . . . . . . . . . 118
File_line . . . . . . . . . . . . . . . . . . . . . . . . . 119
File_matching . . . . . . . . . . . . . . . . . . . . . . . 119
File_name . . . . . . . . . . . . . . . . . . . . . . . . . 119
File_new . . . . . . . . . . . . . . . . . . . . . . . . . . 119
File_number . . . . . . . . . . . . . . . . . . . . . . . . 119
File_path . . . . . . . . . . . . . . . . . . . . . . . . . 120
File_rmargin . . . . . . . . . . . . . . . . . . . . . . . . 120
File_smart_tabs . . . . . . . . . . . . . . . . . . . . . . 120
File_tabsize . . . . . . . . . . . . . . . . . . . . . . . . 120
File_timed . . . . . . . . . . . . . . . . . . . . . . . . . 120
File_w_height . . . . . . . . . . . . . . . . . . . . . . . 120
File_w_left . . . . . . . . . . . . . . . . . . . . . . . . 121
File_w_top . . . . . . . . . . . . . . . . . . . . . . . . . 121
File_w_width . . . . . . . . . . . . . . . . . . . . . . . . 121
File_wordwrap . . . . . . . . . . . . . . . . . . . . . . . 121
File_x . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
File_y . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Sys_autoindent . . . . . . . . . . . . . . . . . . . . . . . 121
Sys_autostrip . . . . . . . . . . . . . . . . . . . . . . . 122
Sys_autotrail . . . . . . . . . . . . . . . . . . . . . . . 122
Sys_backups . . . . . . . . . . . . . . . . . . . . . . . . 122
Sys_bounce . . . . . . . . . . . . . . . . . . . . . . . . . 122
Sys_bspace . . . . . . . . . . . . . . . . . . . . . . . . . 122
Sys_carraige . . . . . . . . . . . . . . . . . . . . . . . . 122
Sys_cmode . . . . . . . . . . . . . . . . . . . . . . . . . 122
Sys_cols . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Sys_delete . . . . . . . . . . . . . . . . . . . . . . . . . 123
Sys_extensions . . . . . . . . . . . . . . . . . . . . . . . 123
Sys_fcount . . . . . . . . . . . . . . . . . . . . . . . . . 123
Sys_inmacro . . . . . . . . . . . . . . . . . . . . . . . . 123
Sys_insmode . . . . . . . . . . . . . . . . . . . . . . . . 123
Sys_matching . . . . . . . . . . . . . . . . . . . . . . . . 124
Sys_mouse . . . . . . . . . . . . . . . . . . . . . . . . . 124
Sys_rdefs . . . . . . . . . . . . . . . . . . . . . . . . . 124
Sys_recording . . . . . . . . . . . . . . . . . . . . . . . 124
Sys_rmargin . . . . . . . . . . . . . . . . . . . . . . . . 124
Sys_rows . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Sys_sdefs . . . . . . . . . . . . . . . . . . . . . . . . . 124
Sys_smart_tabs . . . . . . . . . . . . . . . . . . . . . . . 125
Sys_tabsize . . . . . . . . . . . . . . . . . . . . . . . . 125
Sys_timed . . . . . . . . . . . . . . . . . . . . . . . . . 125
Sys_word_delim . . . . . . . . . . . . . . . . . . . . . . . 125
Sys_wordwrap . . . . . . . . . . . . . . . . . . . . . . . . 125
Sys_zoom . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Version . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Ws_size . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Chess Execution Errors . . . . . . . . . . . . . . . . . . . . . 127
Abort . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Arguments . . . . . . . . . . . . . . . . . . . . . . . . . 127
Bingo Intrinsic . . . . . . . . . . . . . . . . . . . . . . 127
Class . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Declaration . . . . . . . . . . . . . . . . . . . . . . . . 127
Exec Interp . . . . . . . . . . . . . . . . . . . . . . . . 127
Function Table Overflow . . . . . . . . . . . . . . . . . . 127
Interpretor Parsing . . . . . . . . . . . . . . . . . . . . 127
Left Brace . . . . . . . . . . . . . . . . . . . . . . . . . 127
Left-Value . . . . . . . . . . . . . . . . . . . . . . . . . 128
Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Range . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Right Paren . . . . . . . . . . . . . . . . . . . . . . . . 128
Stack (Pop) . . . . . . . . . . . . . . . . . . . . . . . . 128
Stack (Push) . . . . . . . . . . . . . . . . . . . . . . . . 128
Symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
System Call . . . . . . . . . . . . . . . . . . . . . . . . 128
System Variable . . . . . . . . . . . . . . . . . . . . . . 129
Variable Table Overflow . . . . . . . . . . . . . . . . . . 129
Some Example Chess Code . . . . . . . . . . . . . . . . . . . . . 130
Example #1: Execute the Current File . . . . . . . . . . . . 130
Example #2: Factorials . . . . . . . . . . . . . . . . . . . 130
Example #3: Synchronized Scrolling . . . . . . . . . . . . . 131
License Agreement . . . . . . . . . . . . . . . . . . . . . . . . 132
Registration Form - Bingo 3.00 . . . . . . . . . . . . . . . . . 134
Site License Policy . . . . . . . . . . . . . . . . . . . . . . . 136
The Author . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 138
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Introduction
------------
This document serves as the reference manual for Bingo 3.00.
Bingo is a full-featured text editor at the right price. Some of its
features include:
- high speed execution
- virtual memory for file storage; up to 240 Megabytes of file
storage possible
- CHESS C-like interpreted language giving you access to Bingo's
power in a true programmable language with looping, decision
making, functions, variables and more.
- full color support
- completely programmable keyboard, allowing 1,2, and 3-key
combinations as well as programmable mouse support
- support of VGA, EGA, & MCGA extended text modes
- large suite of utility functions: entab; detab; command repeat
- custom define your own keyboard setup
- complete menu system supporting most Bingo functions
- multiple files, multiple windows
- execute DOS commands, including command-line compilers within
only ~3k of overhead
- regular expression search and replace
- highly configurable from within itself
- use placemarks to mark positions in files
- user definable help file
- extensive block operation support, include point, line and column
marking, and two different sets of block operations
- one default block buffer, plus 26 additional named buffers
- wordwrap, paragraph formatting, and autoindent support included
for text processing work
- C Mode supports programming in the C programming language
- User-defined delimiter and indentation matching
- directory list picker
- execute *any* Bingo function from within Bingo whether it has
been assigned to a key or not using a 'function picker'
- interrupt Bingo at any point and exit, and when you restart Bingo
it will pick up exactly where you left off
- print files & blocks through the serial port, parallel port, or
to a file, with or without line numbers and/or page headers
- set printing left margin, top margin, and lines per page
- automatic processing of errors generated by the Borland and
Microsoft developmental tools
- undelete stack of deleted items
- execute any command or macro "globally" over all files
- profile files allow file extension specific settings
- box draw mode for easy screen design
- automated, timed backups
Bingo 3.00 Reference Manual
1
Philosophy
----------
Text editors are not required for every system; at least, an
editor of Bingo's power is not. If all you require of your editor is
that it allow you to modify batch files and such, Bingo is overkill.
Cheap overkill, but still overkill. However, if you use an editor
daily, as a programmer, as a consultant who hops from system to system
and likes to have his/her own tools, or in any other situation where
you need to depend on it, Bingo could very well be what you are
looking for. Why? In spite of its power, Bingo is very inexpensive,
and does some things no other editors do, as a look at its feature
list will convince you.
People who live with an editor daily for long stretches of time
know that choosing an editor is a near-religious experience. Defense
of your choice develops into a kind of fanaticism. In the Unix world,
VI/Emacs wars promise to extend into the next millennium. It was the
fact that I could not find an editor I was truly comfortable with that
prompted me to design Bingo. In doing so I believe I have created an
editor that appeals to a broad base of users.
Bingo allows a large degree of latitude when it comes to
assigning keys. In a complementary fashion, it allows a user
specified file to be used for help. Further, because of Bingo's
extensive and powerful menuing system, you do not need to memorize a
large number of keystrokes in order to use Bingo effectively. This
allows you to get up and going in a minimum amount of time.
Bingo has a large degree of programmable mouse support has been
added. I have found mouse use to be very nice when editing, and the
response has been very enthusiastic. Version 2.10e added an
additional mouse primitive 'mouse_scroll' which, combined with the
macro capability, allows you to scroll and drag with your mouse.
Bingo is optimized for response time. Screen response in
particular is very quick, taking full advantage of the PC's direct
video architecture. Searches also occur at blazing speed -- a must if
you spend many hours with an editor.
Bingo is heavily configurable, all from within the editor itself.
This "on-the-fly" ability is a lifesaver if you hop from one system to
another.
Bingo has all the standard macro and file handling abilities, but
it specifically excels at block handling. Three types of marking, 27
buffers to use, and a huge array of functions to deal with block
operations allow you to use blocks to their fullest.
Especially designed for programmers, Bingo includes a suite of
utility functions to aid in handling program text. Functions to shift
blocks of text left and right, to align blocks, to sort blocks, to
match delimiters, and to move by indentation are only a few of the
many handy functions included. In version 2.10e, you can specify just
what a delimiter is, say "repeat" and "until". Then you could sit on
a "repeat", and let Bingo find the matching "until".
With version 2.01, a powerful regular expression search and
replace method has been added. Further, 'profile' files, which enable
Bingo 3.00 Reference Manual
2
specific text settings to be associated with files having certain
extensions, are supported. To make this useful, each file (or buffer)
in the ring now maintains its own set of these settings. This allows
you to have the correct settings for .DOC files show up when you load
.DOC files, the correct settings for .CPP files do likewise, and so
on.
With version 2.10, virtual memory was introduced, allowing the
editing of files totalling more than 200 megabytes. This was a major
change and added a quantum leap of functionality to Bingo. I regard
this add of functionality as attracting the majority of new users'
initial attention, thus increasing my registrations.
Now, with version 3.00, I am pleased to release Bingo with the
Chess procedural language. Chess extends to you, the user, a
phenomenal amount of control over Bingo's behavior. Chess supports
looping, if-then-else statements, variables, functions, and more.
Chess code can be executed automatically at startup, linked to profile
files for specific file extensions, assigned to specific keystrokes,
or run from a command line.
Bingo 3.00 Reference Manual
3
The Association of Shareware Professionals
------------------------------------------
This program is produced by a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that the
shareware principle works for you. If you are unable to resolve a
shareware-related problem with an ASP member by contacting the member
directly, ASP may be able to help. The ASP Ombudsman can help you
resolve a dispute or problem with an ASP member, but does not provide
technical support for members' products. Please write to the ASP
Ombudsman at 545 Grover Road, Muskegon, MI 49442 or send a CompuServe
message via CompuServe Mail to ASP Ombudsman 70007,3536.
Version 3.00 is the first version of Bingo to be released since I
became a member of the ASP (I was notified 4 days prior to the planned
release date of v3.00!). With the extended opportunities and contacts
available to me through the ASP, I should be able to take Bingo
further than would have been possible in order to serve my customers
better.
Bingo 3.00 Reference Manual
4
The Shareware Concept and Registering
-------------------------------------
This is just a general note as to what Bingo being Shareware
means to you, the user. Shareware could just as easily be called
"Honorware": I depend upon you honor to mail in your payment for Bingo
if you are using it regularly. All of the legal jargon describing
this Shareware concept is contained in the License & Registration
section of this manual.
Basically, I depend upon you to mail in your payment for Bingo
after you have taken a reasonable amount of time to try it out. If
you use it regularly, please mail in the payment. The number of man-
hours which went into Bingo is incredible; the registration fee is a
small price to pay. So if you use Bingo regularly, send me the
registration fee I charge for Bingo -- it's not much money for a very
sharp program.
When you register, you are entitled to a number of advantages,
depending on how you register. If your registration is a Single
Version registration ($40), these benefits include:
1) If you request it, I will mail you a copy of the current
release of Bingo free.
2) You are entitled to support for 9 months, or until 1 month
past the release of the next version, whichever is longer.
If your registration is a Lifetime registration ($75), your benefits
are a little more extensive. They include:
1) If you request it, I will mail you a copy of the current
release of Bingo free.
2) You are entitled to support for as long as Bingo is marketed
as a product, be it as shareware or commercial.
3) The next release will be mailed to you free of charge.
4) You will be notified of each successive release, and each will
be available to you for a mere $5.00 shipping fee.
In addition, with version 2.01 and beyond, registered users of
any sort get to have their named emblazoned on their copy for all to
see; this way everyone will know what honorable people they are. And
no, a simple sector editor cannot change this name -- it has to be
done here. The name will be shown on the initial screen which is
popped up when Bingo is executed, and can also be accessed from the
'version_info' function.
Also, some registered users are able to beta-test upcoming
versions -- a double-edged sword. Beta testing is somewhat precarious
at times, but you do get to take a hand in forming the next version.
Plus you get to have your complaints redressed faster than the general
public.
Bingo 3.00 Reference Manual
5
Ordering Direct & PsL Shareware Registration
--------------------------------------------
You can order directly from me at the below address:
Christopher R. S. Schanck
PO Box 279
Hanover MD 21076
(410) 379-9019
You can also register from Public (software) Library with your
MC, Visa, AmEx or Discover card by calling 800-2424-PsL or
713-524-6394 or by FAX to 713-524-6398 or by CompuServe to 71355,470
or by mail to PsL, PO Box 35705, Houston, Texas 77235-5705. Bingo's
order # is 10399. Please use this number when ordering if possible.
These numbers are for ordering only. For information about dealer
pricing, volume discounts, site licensing, shipping of product,
returns, latest version number or other technical information, contact
me directly at the above address.
Bingo 3.00 Reference Manual
6
Things to Possibly Come
-----------------------
For quite a long time, virtual memory was "something to come".
However, 2.10 introduced a fast, efficient virtual memory paradigm.
Theoretically, it allows you to edit up to 240 Megabytes of file
storage -- that is a lot of text! Practically, it means that if you
have the disk storage, you need not worry about memory constraints
again.
For some time, another goal was implementing a full procedural
language. Earlier this year (12/91) I began prototyping a full
procedural interpreter which was to be integrated into Bingo. I am
pleased to announce the Chess procedural language as an integral part
of Bingo starting with version 3.00. Chess is a very powerful, if
minimalistic, C-like language complete with looping, if-then-else
statements, variables, functions, and more. You can interrogate Bingo
for its current status, and ask the user for a variety of input.
So what remains? Plenty; it seems that the more goals I reach,
the more I (and my users!) can come up with. Two major things are
currently being looked at. First, I really want to add customizable
menus to Bingo; even more so with addition of Chess, this seems to me
to be a very important addition. Second, I am currently exploring
various methods of implementing a multi-level undo.
Bingo 3.00 Reference Manual
7
Support
-------
As any of my registered users will tell you, I am committed to
supporting Bingo. Without my users, where would I be? Anyone,
registered or not, who calls or writes me will receive prompt and
(hopefully) useful help. I particularly like to hear of requests;
anything you would like to see in Bingo, let me know. One of my beta-
testers remarked that he felt like he had a personal editor --
anything he wanted was added.
I am now residing in the Baltimore area. The address and phone
number to contact me at is:
Christopher Schanck
PO Box 279
Hanover MD 21076
(410) 379-9019
You are welcome to call me at the above number, but while the address
will be stable for the next several years, phone numbers do change.
Should this number become invalid for any reason, call (215) 691-1070
(9am to 6pm, EST). If you wish, you will be given a number where you
can currently reach me, or you can leave your name and number, and I
will return your call within 2-3 days.
PLEASE feel free to contact me. I very much like to hear from
you!
Bingo 3.00 Reference Manual
8
CompuServe
----------
You will get the quickest response from me via Compuserve. You
can contact me there as:
70541,3614
On the Internet, that would be:
70541.3614@compuserve.com
Bingo 3.00 Reference Manual
9
Getting the Latest Version
--------------------------
If you have a copy of Bingo but are not sure if it is the latest
version, the best way to find out is by calling the Computer
Connection BBS in Washington DC. This is a very large, well-managed
BBS. The latest version of Bingo will always be available here, and
E-Mail left for me will be answered. The number is (202) 547-2008.
Likewise, Bingo will always be on Compuserve, in the IBMNET section,
generally named BINGO?.ZIP.
Bingo 3.00 Reference Manual
10
Using this Manual
-----------------
This manual is broken into four parts. The first is an overview
of Bingo itself, including things like customization.
The second section consists of sections on each major
functionality present in Bingo. These individual sections are not
tutorial in orientation, but rather give necessary information needed
to utilize this functionality. Each section has both a narrative
section and a function reference.
The third section is a overview and introduction to the Chess
procedural language, covering things like syntax and rules. The final
section is the library reference for Chess.
I suggest that the first time user first read the initial
sections for pertinent information, then go through the function
summary thoroughly. This will give you a clear idea of the
capabilities of Bingo. Reading the thrid section will familiarize you
with the capabilites of the Chess language.
Finally, *please* read the READ.ME file very carefully. In some
cases it will have information this file doesn't contain, and it may
describe some things in greater detail as it is kept as a running log
as I make changes.
Bingo 3.00 Reference Manual
11
Overview
--------
Installing Bingo
----------------
There are 2 files which are of critical importance for Bingo to
run.
BE.EXE is the executables. If you dislike typing 'be' at the DOS
command, you CAN rename Bingo's executable. One point to remember,
don't invoke the .EXE file directly.
KEYCFG.SET is the compiled keyboard definition file. This needs
to be in the same directory as BE.EXE, or in the current directory.
Without these two files, BE.EXE & KEYCFG.SET, Bingo will not
start.
There is another file which is useful but not mandatory for Bingo
to run. BINGO.INI, in either the current directory or in same
directory as BE.EXE.
The help file BINGO.HLP, is an additional file which must be in
the same subdirectory as BE.EXE if you wish to use it. When you
invoke help, Bingo will look there for the file BINGO.HLP. The file
may contain your own description of the current key layout, or just
about anything else you would like. Bingo comes with a default help
file.
As an example, assume the Bingo distribution files are contained
on floppy disk on drive A:, and you are installing Bingo on drive C:.
First, move to drive C: and create a directory for bingo, called
\bingo using DOS's mkdir command. Move to this subdirectory using 'cd
\bingo'. Now copy the files from drive A: over to the proper
subdirectory by using 'copy A:*.* C:\BINGO'.
Bingo 3.00 Reference Manual
12
BOPTS: The External Config Utility
----------------------------------
While most of Bingo's options are configurable from within Bingo
itslef, for certain technical reasons some are not. BOPTS is a
utility which allows you to set these. To run BOPTS, use
BOPTS
and BOPTS will look for the file BE.EXE in the current directory.
Using:
BOPTS <executable name>
and BOPTS will look for the name you give it.
BOPTS will allow you to alter several key attributes affecting
the way Bingo runs. This section will detail what those options are,
and what they can do for you.
BOPTS will modify the BE.EXE executable directly, so if you are
going to compress it with one of the several popular utilities which
do so, beware, you will have to uncompress it for BOPTS to work.
Also, if you have anti-virus programs, they will probably complain
about BOPTS modifying BE.EXE as well.
The good news is that the settings controlled by BOPTS are of a
nature that you will not have to set them often.
# of Buckets & Bucketsize
-------------------------
The first two options are the # of virtual memory 'buckets' Bingo
uses allocates space for upon startup, and the second is the 'size' of
each virtual-memory bucket, or 'bucketsize'. In short, the number of
buckets (up to 15k) times the size of each buckt (up to 16k)
determines the maximum theoretical memory limit. For a full
discussion of how these two parameters impact performance, see the
secion on Virtual Memory.
Chess Stack Size
----------------
This option controls the number of items Bingo allocates room for
Chess subprograms to use on the Chess stack. Since all Chess
subprograms sharea common stack, this can be important. In heavily
recursive pieces of code, increasing this can be very important.
Chess # of Variables
--------------------
This dictates what the maximum number of Variables Bingo
allocates handles for on startup.
Chess # of Functions
--------------------
This dictates what the maximum number of Functions Bingo
allocates handles for on startup.
Bingo 3.00 Reference Manual
13
Scramble Registration Name
--------------------------
This option will allow you to scramble the registration name in a
copy of BE.EXE. This will blank out the current registration name.
This is included so that people who have registrered copies and wish
to pass them along can expunge there name from the executable.
Bingo 3.00 Reference Manual
14
Bingo & Virtual Memory
----------------------
In version 2.10, Bingo introduced a virtual memory paradigm to
allow programmers to edit more and larger files. Virtual memory is a
simple, elegant, beautiful concept in the abstract; the reality, on an
MS-DOS based PC, is a very hairy beasty indeed. Many different
methods for implementing virtual memory were examined. The one I
settled on seems a good compromise; Bingo is still quick, and the
memory/disk swapping necessary when you are working with large files
is relatively unobtrusive. I still edit fairly regularly on an 8088
machine, with a 65ms hard disk, and I find Bingo plenty fast enough.
On a 386 with a fast drive (say, an 80meg IDE drive with a 32k onboard
cache), you never even realize it is swapping.
Bingo treats file storage as a set of fixed length blocks. As
shipped, Bingo is generally configured for 4096 byte-sized blocks, or
4k. Internally, Bingo can deal with up to 16k of these blocks, or
*buckets*, configurable from 1k to 16k. The *bucketsize* is the size
of each block and is configurable from 2k to 16k. The larger the
bucketsize, the more blocks (or buckets) allocated the higher the
theoretical memory limit. For instance, a bucketsize of 16k with 8k
buckets gives a theoretical memory limit of 128 Megabytes! So why not
just set the limits way up and be done with it?
Two reasons. First, the larger the bucketsize, the harder Bingo
works to manipulate text. On faster machines, larger bucketsizes are
fine; on a 386/25 Mhz PC, a 16k bucketsize is no problem at all. On
the other hand, a 2k bucketsize is fine on every machine out there.
The more buckets allocated, the less conventional memory Bingo
has available for use. So allocating a lot more than you need is non-
optimal use of your resources.
Second, let's be serious about this. Seldom, if ever, will
someone really need to edit a file 200+ Megs in size. Could happen;
that is why I coded it as I did. But still. Also, do the arithmetic.
To edit a 200M file, you need roughly > 400M of disk storage; 200M for
the file itself, + 200M for the swapfile, + some odd number of bytes
for the file entries in the FAT table (grin). Not a lot of systems
around with several hundred megs of storage hanging about. But we
plan for the future.
You can change the Bucketsize and # of Buckets via the BOPTS
utility.
Impact of Virtual Memory on Performance
---------------------------------------
Virtual memory has had a measurable impact on Bingo's performance
in a number of areas. Users coming from version 2.01 or earlier will
appreciate this discussion of differences.
On the downside, general editing is, in my estimation, a touch
slower. Searches, scrolling, block operations, etc. On the other
hand, the only machine I can tell the difference on is an ancient
8088; use an AT-class machine, and you can't see a difference.
However, even on the 8088, things are by no means slow; searches and
such are still very quick.
Bingo 3.00 Reference Manual
15
One function in particular is much slower. When you sort a
block, things are much, *much* slower in this version. This is not so
much a consequence of the virtual memory per se, but of the new memory
structure. In version 2.01 and earlier, sorting was done with a
recursive algorithm (N log N bound), and swapping lines meant swapping
pointers only. In version 2.10, a stack-based sort is not acceptable,
because with a large file you could corrupt the stack. So the
excellent CombSort algorithm (April 1991 BYTE) was used instead. This
algorithm approximates N log N time, but is ultimately slower. The
real speed killer, however, is that I can no longer simply swap
pointers. Instead, I have to physically move the lines themselves
around. This is slow, slow, slow, pushing the sort time way, way up.
But I did not want to eliminate sorting entirely. I use it too much
to give up.
On the upside, obviously, you can edit humongous files with ease,
and a virtually unlimited number of files. This is an obvious
improvement.
The other highly visible improvement is in File I/O. File
reading and writing has been speeded up by something approaching a
factor of 4. The larger you set the pagesize, the faster file IO will
be. ALthough increasing the pagesize past the size of a disk sector
will generally not show a lot of improvement.
Bingo 3.00 Reference Manual
16
KEYCFG: The Keyboard Configuration Program
------------------------------------------
KEYCFG is the program used to create a keyboard configuration
which the Bingo executable can utilize. KEYCFG also allows you to
embed Chess code (Bingo's procedural language) into a .SET file and
assigned code subprograms to keys. The supplied configuration files
(BINGO.CFG, EMACS.CFG, possibly others) give a good example of how to
set up the file.
Using Chess code in Bingo is covered thoroughly in the Chess
manual, so this section will give a quick rundown on using Chess with
Keycfg.
KEYCFG is invoked as follows:
KEYCFG <configuration name> <keyset filename>
<configuration name> is the name of the text configuration source file
you wish KEYCFG to read, and <keyset filename> is the name you wish
KEYCFG to write the compiled keyboard setup to. The default keyset
file which Bingo looks for on startup is KEYCFG.SET. Bingo will look
first in the current directory, then in Bingo's own home directory.
Alternate keyset files can be loaded from within Bingo using the
'key_set_load' function.
Key Names
---------
KEYCFG's primary job is to assign functionality to keystrokes or
combinations of keystrokes. As such, it is important to know the
possible keynames. The keys follow the following patterns:
f1-f12 are the function keys
!f1-!f12 are the shifted function keys
@f1-@f12 are the control function keys
#f1-#f12 are the alt function keys
@<key> is the control-<key> combination
#<key> is the alt-<key> combination
<key> is a simple key, named key, or a mouse event.
These are named keys:
alt_backspace alt_grey_right_arrow
alt_equal alt_grey_up_arrow
alt_escape alt_keypad_aster
alt_grey_delete alt_keypad_divide
alt_grey_down_arrow alt_keypad_minus
alt_grey_end alt_keypad_plus
alt_grey_home alt_keypad_return
alt_grey_insert alt_minus
alt_grey_left_arrow alt_return
alt_grey_pgdn alt_tab
alt_grey_pgup backspace
Bingo 3.00 Reference Manual
17
backtab keypad_plus
ctrl_backspace keypad_return
ctrl_delete left_arrow
ctrl_down_arrow pgdn
ctrl_end pgup
ctrl_grey_delete return
ctrl_grey_down_arrow right_arrow
ctrl_grey_end shift_delete
ctrl_grey_home shift_down_arrow
ctrl_grey_insert shift_end
ctrl_grey_left_arrow shift_home
ctrl_grey_pgdn shift_insert
ctrl_grey_pgup shift_keypad_5
ctrl_grey_right_arrow shift_left_arrow
ctrl_grey_up_arrow shift_pgdn
ctrl_home shift_pgup
ctrl_insert shift_right_arrow
ctrl_keypad_5 shift_up_arrow
ctrl_keypad_aster tab
ctrl_keypad_divide up_arrow
ctrl_keypad_minus
ctrl_keypad_plus Note: The keynames with
ctrl_keypad_return 'grey' in them, as well as
ctrl_left_arrow F11, F12, and several others,
ctrl_minus denote keys which are
ctrl_pgdn available only if you have an
ctrl_pgup extended keyboard, and you
ctrl_return have the 'Use Extended
ctrl_right_arrow Keyboard Bios' option turned
ctrl_tab on.
ctrl_up_arrow
delete
down_arrow
end
escape
grey_delete
grey_down_arrow
grey_end
grey_home
grey_insert
grey_left_arrow
grey_pgdn
grey_pgup
grey_right_arrow
grey_up_arrow
home
insert
keypad_5
keypad_aster
keypad_divide
keypad_minus
Bingo 3.00 Reference Manual
18
These are the mouse events:
Three_buttons
Left_right_buttons
Left_middle_buttons
Multiple_left_button
Single_left_button
Right_middle_buttons
Multiple_right_button
Single_right_button
Multiple_middle_button
Single_middle_button
Single_up_arrow
Single_down_arrow
Single_left_arrow
Single_right_arrow
Single_pyramids
Multiple_up_arrow
Multiple_down_arrow
Multiple_left_arrow
Multiple_right_arrow
Multiple_pyramids
The configuration file itself consists of two sections:
Section 1 -- Key Assignments
----------------------------
The first is any number of lines of key assignments of one of the
following formats:
a) <key specifier> <function identifier>
b) <key specifier> macro <macro list>
c) <key specifier> <character>
d) ; <comment text>
A line starting with a space is a continuation of the
previous line.
<key specifier> is either a simple <key name>, or two key names
strung together as <key name>+<key name>, or three key names strung
together as <key_name>+<key_name>+<key_name>. For instance, for you
Wordstar people, control-k q would be entered as '@k+q' (Note: in
this case, the Bingo will recognize both the sequence @k+q and @k+Q as
the same thing -- case is not significant.)
The <macro list> is a list of 0 or more function descriptors, as
listed in the Function Summary section, and 0 or more literal
occurrences, and 0 or more named keys, in any order. The literals
must be enclosed in single quotes. The literals will occur in the
macro exactly as if they had been typed. For instance, the line
f1 macro 'Chris' return
Bingo 3.00 Reference Manual
19
would define the f1 key as my name followed by a return.
The <character> is any printable ASCII character, entered without
quotes. For instance,
< ,
would redefined the less-than symbol to be the comma. This
translation will occur during general editing, as well as in the
search and replace string-entry boxes. Everywhere else it will be
ignored.
The following macro would define the Alt-C key to save all
current modified files, execute the make command while swapping Bingo
out to disk, saving the errors in the ERRS file, then load the ERRS
file.
#c macro save_all swap_execute 'make > errs' return return
load_file 'errs.' return
A more interesting variant of this is the one I used prior to
installing the auto-error processing:
#c macro modify_save_all swap_execute 'make > errs' return
return window_bottom load_file 'errs.' return
This version will attempt to put the errors file in the bottom-most
window, and it will initially only save those files as have been
modified.
After adding the auto-error processing, I added a more complex
version of this macro:
#c macro modify_save_all
swap_execute 'make > errs' return return
window_one window_split
load_file 'errs.' return
window_previous
window_resize down_arrow down_arrow down_arrow
down_arrow down_arrow down_arrow return
setup_err_parse 'errs.' return
return next_error
This version saves all modified files, executes MAKE as before, and
returns. When it returns, it makes sure there is but one window,
splits the current window, and loads in the ERRS file. It then
resizes it so the bottom window is smaller, resets the error parsing
to the ERRS file, then searches for the next (first) error.
This last version is very sweet to use if you have a compiler
which generates agreeable error files. Bingo will work with most
compilers I have come across, including the Borland and Microsoft
compilers/assemblers. With the Microsoft tools, you may have to tweak
the compile flags a bit to get a usable format.
'open_end' Key Identifier
-------------------------
KEYCFG allows the use of the 'open_end' identifier in macros to
force Bingo to fetch string input from the keyboard. For example:
f1 macro search open_end 'i' return
will execute the search function, wait for the user to input the
target string, then input 'i' for the search modifier and do the
search.
Bingo 3.00 Reference Manual
20
'open_end' is effective only for string input --- single key
input situations will not respond to it. In effect, 'open_end' is a
very special key name.
'cur_file' Key Identifier
-------------------------
KEYCFG also allows the use of the 'cur_file' identifier in macros
to expand into the current file's name (less path) in string input.
For example:
f1 macro load_file cur_file return
will force the reload of the current file, providing it is located in
the current directory.
'interpret' Function Identifier
-------------------------------
The 'interpret' function is recognized by Keycfg but not by Bingo
itself. Its function is to act as a "silent" 'exec_chess' function.
Used just the same as 'exec_chess', it differs only in that nothing is
displayed on the screen. It is therefore a bit quicker and more
suited for mapping keys to Chess functions. For example:
#z macro interpret 'hello_world' return
would tie Alt-Z to the 'hello_world' Chess function.
Section 2 - Chess Code
----------------------
The second section of a .CFG file is the section of Chess code. To
signal KEYCFG that this section has been reached, use the token
'chess-begin' on a line by itself. The token 'chess-end' signals the
end of this section. All text between these tokens will be
interpreted as Chess code. See the manual on the Chess procedural
language for a further explanation.
KEYCFG Command Line Options
----------------------------
KEYCFG recognizes three command line options. One is a shortcut:
keycfg !
tells KEYCFG to assume the name of the configuration file is
BINGO.CFG, and that the keyset file is KEYCFG.SET. I put this in
primarily for my own use, as I run KEYCFG often during development.
'KEYCFG names' will provide an alphabetical list of all of the
function names which are currently recognized. Useful to have.
Likewise 'KEYCFG keys' will list all recognized keynames and
mouse events. Also useful to have.
Bingo 3.00 Reference Manual
21
The KEYINFO Key Information Utility
-----------------------------------
KEYCFG takes plain text key definitions and 'compiles' them into
.SET file format, KEYINFO takes a .SET file and turns it into its
plain-text equivalent. Further, KEYINFO can take a saved Single-Key
macro and turn it into its plain-text format. This means that you can
define a macro on the fly and get it converted back to its text format
where you can tune it to your heart's content.
KEYCFG can be invoked two ways. First, to turn a .SET file into
its text equivalent, use:
KEYCFG <.SET file name>
To turn a saved macro file into its text equivalent, use:
KEYCFG -s <macro file name>
Bingo 3.00 Reference Manual
22
Starting Bingo
--------------
Starting Bingo is simple. Simply type:
be <filespec> <filespec> ...
be.exe <filespec> <filespec> ...
at the DOS prompt, and you are off. One of several things will
happen. If each filename you gave is discreet (i.e., no wildcards),
the files named will each be loaded, one after another. If a filespec
matches more than one file, a directory list of matching files will
pop up which will allow you to choose a file or files. See the
section on the Directory List for further explanation.
If no filespec is given, Bingo will behave as if you issued 'be
*.*'.
You may also specify the starting line and column position for
the each loaded file. The '/pLL:CC' switch allows you to do this.
For example:
be test.doc test2.doc /p10:5 /p20
would load the file TEST.DOC and move to the 10th line, 5th column.
TEST2.DOC would begin on the 20th line. If you do not give a column
argument, the first column will be assumed.
Similarly, you can use the '-x<filename>' switch to run a macro
file on startup. For Example:
be test.doc test2.doc /xfun1.mac
would load both files, then execute the macro file FUN1.MAC inside the
buffer holding TEST.DOC.
Bingo 3.00 Reference Manual
23
The BINGO.INI file
------------------
With version 2.11a, Bingo's configuration settings are stored in
a file called BINGO.INI. When Bingo starts up, it will look first in
the local directory, then in BE.EXE's execution directory. If it is
found in neither of these places, you will not be notified and Bingo
will run with the default settings it is shipped with. To create
BINGO.INI, use the 'save_settings' function.
Moving the settings to a seperate file means that the settings
and the key configurations are held in 2 seperate files. This allows
you to effortlessly use executable compression programs such as LZEXE
(TM) and PKLite (TM) to compress BE.EXE; no longer is BE.EXE in the
habit of modifying itself.
Bingo 3.00 Reference Manual
24
Bingo and Larger Screen Displays
--------------------------------
EGA, VGA, and MCGA video display cards support displays larger
than the standard 25 rows by 80 columns. Bingo does support editing
on these screen sizes. Bingo can be set to handle screen displays in
one of three ways:
- Bingo can be set to detect the current screen type and
dimensions, and do retrace checking.
- Bingo can be set to detect the current screen type and size,
but do no retrace checking.
- Bingo can be set to switch to 43/50 line mode if it is
supported. No retrace checking will be performed.
As shipped, Bingo chooses the middle of these three courses. The
retrace checking is only done if you are using a color display with a
25x80 configuration.
There was a bug in v2.11 with regard to screen size; Bingo
started up in 25x80 size regardless of this setting.
Bingo 3.00 Reference Manual
25
Bingo's Menu System
-------------------
Bingo implements a comprehensive menu structure to aid you in
utilizing Bingo's functions. Many people, myself included, do not
necessarily wish to spend the time to assign every function we need to
a keyboard equivalent. This requires a large time investment before
you can begin using the editor. On the other hand, it is very
irritating when you need a particular function and cannot use it
because you did not have the foresight to assigned it to a key
combination.
Bingo's menu system was designed to handle just this situation.
By assigning the 'main_menu' function to a keystroke, you effectively
have access to *every* function Bingo has. First, almost all of
Bingo's functions are directly accessible from the menus, grouped in
logical sets, following a logical hierarchy. The remaining functions
can be accessed by selecting the 'eXtras' sub-menu, then the 'Pick &
exec' function. This function then allows you to choose from a list
of *all* supported functions.
I have found that for most people, it pays to assign your most
commonly needed functions to keystrokes, and then rely on the menu
system for the ones which are used to a lesser degree. The logical
structure of the menus allows for easy access to less frequently
needed functions.
The menus themselves work quite easily. A list of possibilities
is presented. A menubar can be moved up and down to make your choice;
pressing Return selects the choice. In addition, each choice has a
highlighted character; pressing this character will automatically
select the choice.
In some cases you may be presented with a child menu. Here again
you may make a choice as before, with one additional bit of
functionality. If you are in a child menu, pressing the PgUp or PgDn
keys will move you to the previous or next sibling menu, respectively.
The Print menu, as well as all of the configuration menus, is a
multiple menu. This means that after you have made a choice, the
action will be executed and you will be returned to the menu at the
same spot. I have found that when printing and configuring, people
usually want to do more than one task. Menus which are multiple will
have an asterisk ('*') printed at the bottom of the menu border.
The Escape key always closes the current child menu. If you are
at the top menu, it quits the menu system entirely. To see how your
mouse, if you have one, interacts with the menus, see the section
concerning Bingo and a mouse.
Bingo 3.00 Reference Manual
26
Bingo's User Interface
----------------------
Bingo's user interface comes in two flavors. The default method,
which long-time users of Bingo will recognize, uses bordered boxes in
the center of the screen to display and ask for user input. The
second type of interface, which uses a command line at the bottom of
the screen, is new for v3.00. Which interface style is used is
controled by the setting of the 'conf_dialogue' option. Regardless of
the setting, the input rules are the same for the 4 main types of
interface interaction. They are as follows.
String Entry Boxes:
These are the boxes which ask you for string input. The easiest
example is when Bingo asks you for a filename. These boxes allow you
to enter string input in a flexible manner. A wide variety of
keystrokes are available to aid in this endeavor; they are:
^F/CursRt One Character Forward
^B/CursLt One Character Backward
^A/Home Beginning of Line
^E/End End of Line
^K/CtrlEnd Delete to Eol
CtrlHome Delete to Bol
^Y Delete Line
Tab Insert from Paste Buffer
Insert Toggle insert Mode
Alt-A Invoke the ASCII Table
Up Arrow In Boxes interface mode, pops up a list of
the previous 15 strings entered. In Command-
Line interface mode, displays the previous
string entered. Repeatedly hitting this key
will cycle through the entire list.
Down Arrow Valid only in Command-line mode, this cycles
through the list in the opposite direction as
Up Arrow.
PgUp In Boxes interface mode, pops up a list of
the previous 15 filenames edited. In
Command-Line interface mode, displays the
previous filename entered. Repeatedly
hitting this key will cycle through the
entire list of filenames.
PgDn Valid only in Command-line mode, this cycles
through the list in the opposite direction as
PgUp.
Pressing <Escape> will abort out of the string entry operation.
Bingo 3.00 Reference Manual
27
Yes/No Boxes:
These are the boxes which require a yes or no answer to a
question. An example of this is when you 'quit' a file and the file
has been modified. Bingo will ask you if you wish to save the file.
Each time you enter a Yes/No box, one of the two options will be
will be highlighted (in the Command-Line method, the 'Y' or 'N' will
be capitalized to indicate the default). This is the default option
which will be selected if you press <Return>. In the Boxes interface
method, using the Left and Right Arrow keys, you can change the
current selection. Alternatively, you can press either the 'y' key
(any case) for a yes answer, or the 'n' key (any case) for a no
answer.
Pressing <Escape> will abort the operation.
Bingo 3.00 Reference Manual
28
Non-Editable Display Boxes:
The easiest example of this type of box is the Help box, or the
Info box. This type of box simply displays a number of lines within a
box. By using the Up and Down arrows (also the space bar) you may
scroll by lines, and by using the Page Up and Page Down keys you may
scroll by pages.
Any other keystroke will exit the box.
The Command-Line method, when turned on, will display the same
box as the Boxes method; there is no command line equivalent.
List-Picking Boxes:
The best example of this type of dialogue box occurs when the
'directory list picker' pops up. This type of box is very similar to
the Non-Editable box discussed above, but the idea here is not merely
to display information but to facilitate making a choice. There will
be a menubar highlighted, showing the current selection. You may move
this bar up and down using the arrow and page keys. Pressing <Return>
will selection this option.
Additionally, the initial character of each selection may be
highlighted. If so, pressing the corresponding character will
automatically select this option.
Finally, even if the leading characters of each selection are not
so highlighted, you may "step" through the selections by pressing
letter keys. The menubar will move to the next selection which starts
with the letter pressed. If necessary, the menubar will wrap to the
top of the list (Bingo will beep in this case). In the case of the
directory picker, the leading '\' characters of directory entries will
be ignored.
As is the custom, the <Escape> key will abort the operation.
Again, there is no Command-Line equivalent; a bordered boxe will
be used.
Bingo 3.00 Reference Manual
29
Directory Lister
----------------
One of the extremely useful features of Bingo is its directory
lister. Often, Bingo will ask for a filename. If the name you give
matches more than one file, in the case of wildcards, for instance,
the lister will appear with a list of matches and all subdirectories
in the current directory. There are several features embedded in this
lister to assist you in choosing a file.
First, all subdirectory entries in the current directory will are
shown at the top, with a '\' character preceding them. Selecting any
of these will cause the lister to change to that directory.
Second, pressing a letter causes the Lister to move to the next
filename whose first character matches the letter pressed. A beep
will sound if the search wraps around to the beginning.
The list is sorted alphabetically by name, but subdirectory
entries come first. The last entry is always the New Specification
entry, which allows you to type in a new specification, perhaps
another drive if it is necessary.
You have 2 choices in the directory lister other than choosing a
file. The second-last option in the list, "Load All Matching Files",
will, as you might guess, load all the files shown in the list. It
will not attempt to load subdirectories. The last option, "New File
Spec", allows you to re-choose the directory specification.
Bingo 3.00 Reference Manual
30
Bingo and File Names
--------------------
Many times during normal operation, Bingo will ask you for a
filename. Bingo potentially handles filenames slightly differently
than plain vanilla DOS. In particular, let's examine the difference
between
'thisfile' & 'thisfile.'
The first does not contain a period. In this case, Bingo will do
two things. First, it will, for each defined default extension, check
if the file with that extension exists. If it does, it will use that
filename. Possibly, one of the default extensions is '.*'. This
would lead you to a directory list picker.
The second contains the trailing period, and so will be used as
is. So, in order to specify a file ignoring the default extensions,
you must add the trailing period.
Additionally, Bingo accepts either '/' or '\' characters as file
delimiters. This will make life a little easier on those of us who
use UNIX systems regularly. Finally, version 2.10 allows the use of
the '..' and '.' directory primitives.
Also, there are two other specifications you my use. ':home:'
will be translated by Bingo into Bingo's original directory. So,
':home:bingo.hlp' would be translated to 'bingo.hlp' in Bingo's home
directory. Likewise, ':temp:' will be mapped to the value of the TEMP
environment variable. If TEMP is not defined, it will use the TMP
environment variable.
Bingo 3.00 Reference Manual
31
The Status Line
---------------
On the bottom line of each window in Bingo's display is the
status line. This line communicates several valuable pieces of
information. On the left side of the line, the current line and
column are displayed. Next are a series of flags:
a Autoindent
b Box Draw Mode
c C mode
i Insert mode
m Matching Mode
r Recording Macro
t Smart Tabs
w Wordwrap
z Zoom mode
For each of these flags, if the letter is capitalized, it indicates
that the toggle is on, while a lowercase character indicates the
option is toggled off.
Next you will see something looking like [x/y] where 'y' is the
number of files in the ring, and 'x' is the position of the current
file in the ring.
Finally, the full pathname comes. If it is prefaced with an
asterisk '*', it means the file has been modified.
At the end of one of the on screen status lines, you will see
either one or three little pyramids. If there is a single pyramid,
that means it is not the active window. If there are three pyramids,
they tell you which is the active window. If the three pyramids are
pointing up, the full-width window above the status line is the
current window. If the three pyramids point to the left, this means
that of the two windows above the status line, the one on the left is
the active window. If the three pyramids point to the right, the
window on the right is active.
The same rules concerning the direction of the pyramids hold for
inactive status lines, except that only one pyramid will be present.
If this all sounds complicated, don't worry. Open a few windows
and move among them; it will become much clearer.
Finally, on the right end of the current status line, a 'T' or
'F' character will be shown. This represent whether the last
operation Bingo executed returned a value of True or False; i.e.,
whether it worked.
Bingo 3.00 Reference Manual
32
Bingo & The Mouse
-----------------
Bingo has the capacity to make extensive use of a Microsoft
(trademark, copyright, and kudos to Microsoft) compatible mouse,
should you have one installed. In order for the mouse to work, three
things must be true:
1) It must be connected to the computer properly. See your mouse
manual for instructions.
2) You must have your mouse driver installed properly. Again,
see your mouse manual for instructions on how to accomplish this.
3) You must have the 'Use Mouse' option turned on, found in the
General configuration menu. Bingo is shipped with mouse use turned on.
Bingo is designed to allow users of three button mice to make
full use of all three buttons (I have a three button mouse). However,
users with two button mice will only lose a little functionality when
it comes to programming the mouse, and no functionality at all when it
comes to dealing with the menus and dialogue boxes.
It is generally easy to tell if the mouse is working; the status
line will have four additional "buttons", each consisting of three
arrows enclosed in square braces. Also, to conserve space, the
filename will be shown without its full path.
The Mouse Cursor
----------------
The mouse cursor will appear on your screen as a solid, non-
blinking block, which changes color depending on the underlying color.
It should be possible to move the cursor over the entire screen. If
the mouse cursor is present, it means that a response with the mouse
is possible. If it is not visible, this means that at this point, no
mouse response makes sense.
The Mouse at the General Editing Level
--------------------------------------
At the general editing screen, Bingo has 20 programmable mouse
events. The programmable events are handled exactly as key
assignments are handled: through KEYCFG. These are the mouse names:
Mouse Event Identifiers
Three_buttons Left_right_buttons
Left_middle_buttons Multiple_left_button
Single_left_button Right_middle_buttons
Multiple_right_button Single_right_button
Multiple_middle_button Single_middle_button
Single_pyramids Multiple_pyramids
Single_up_arrow Single_down_arrow
Single_left_arrow Single_right_arrow
Multiple_up_arrow Multiple_down_arrow
Multiple_left_arrow Multiple_right_arrow
Bingo 3.00 Reference Manual
33
The first ten are concerned simply with what happens when you
press the corresponding button sequence. Note that users of two-
button devices will only be able to utilize five of these, those
dealing with the left and right buttons.
The second ten refer to the 5 "hot spots" on the active status
line. There are two for each button, one for a single click and one
for a double click.
Now that you know of these event names, what can you do with
them? Well, you can assign them anything you could assign a key. In
addition, two special functions are provided to help deal with the
mouse:
snap_to_mouse_xy:
this function moves the cursor to the current mouse
position. If necessary, it will change the active window.
mouse_scroll:
this function is kind of an expanded snap_to_mouse_xy.
First, it moves the cursor to the mouse position. Then, as
long as a mouse button is held down, the screen will scroll
in the following manner:
1) If you are in the upper 1/8 of the screen you will
scroll up.
2) If you are in the next 1/8 of the screen, the screen
will scroll up, but more slowly.
3) If you are in the lower 1/8 of the screen you will
scroll down.
4) If you are in the next lower 1/8 of the screen, the
screen will scroll down, but more slowly.
If you are elsewhere on the screen, you simply move the
cursor about. This makes 'click & drag' operations
possible.
Combining these with other functions, quite powerful mouse events can
be programmed. For example:
Single_left_button snap_to_mouse_xy
Single_right_button macro snap_to_mouse_xy point_mark
Multiple_left_button macro snap_to_mouse_xy linemark
mouse_scroll linemark
The first simply moves the cursor, while the second moves the cursor
and drops a point mark. The third lets you scroll about the file,
delineating an area to be marked.
The ten "hot spots" can also be programmed as if they were keys.
Single_down_arrow cursor_down
Double_down_arrow down_page
Bingo 3.00 Reference Manual
34
Here, this has defined the down arrow button to respond with a
cursor_down if a single click occurs on it, or a down_page if a double
click occurs on it.
These "buttons" work a little differently than you might expect -
- as long as you hold the mouse button down, the function will
repetitively execute. So, if you double click on the down arrow
"button" and hold the second click down, you will see the file whiz by
at a truly astonishing speed. The speed with which the functions are
repetitively executed can be governed using the 'conf_mdelay'
function.
These 20 events give you the user an unparalleled degree of
control over how the mouse responds.
The Mouse and The Menus
-----------------------
The mouse would not be very useful if it was not well integrated
into the menu system. Great pains have been taken to make mouse use
easy and intuitive with respect to the menu system.
It is very simple. The left mouse button selects something, and
the right mouse button closes the current menu. However, there are a
few refinements.
If the item you select with a single left click is in the
rightmost menu, the effect is the same as if you had moved to that
selection and hit <return>. If the item is not the rightmost menu,
say the it is in the Main menu and you currently have the Block menu
open, then you will simply be moved to the selection, with the other
menus closed for you. However, no equivalent <return> will be
executed.
If, however, you use a double left click, the selection will be
executed regardless of where it was on the menu hierarchy. Any extra
open menus will be closed to bring you to the selected level.
Likewise, a single right click will close the current menu.
However, a double click will close *all* open menus.
Note that this gives you some capabilities which are not
available from the keyboard.
If the above sounds complicated, don't worry. In practice, it is
very easy. I would suggest you restrict yourself to single clicks
when you begin, then move to double clicks when you are sure of what a
single click would do. You will very quickly find that the menus are
effortlessly intertwined with the mouse.
Bingo 3.00 Reference Manual
35
The Mouse & Dialogue Boxes
--------------------------
Throughout Bingo, you will encounter many dialogue boxes. There
are four main types, and all support mouse use where appropriate. They
are:
String Entry Boxes:
These are the boxes which ask you for string input. The easiest
example is when Bingo asks you for a filename. There are only a few
mouse options in these boxes; most of the time you must enter text
from the keyboard.
However, there are three supported button events. A single left
click has the same effect as a <return>; it accepts the current
string. A double left click wipes out the string; it in effect is a
Control-Y equivalent. Finally, any right button click is the
equivalent of an <Escape> key.
Yes/No Boxes:
These are the boxes which require a yes or no answer to a
question. The easiest example of this is in the configuration
options, where you are asked if you wish to toggle the option. By
placing the mouse cursor over the [Yes] selection and pressing the
left mouse button, you answer in the affirmative. Likewise, placing
the mouse cursor over the [No] selection and pressing the left button
answers in the negative.
As usual, pressing the right mouse button is equivalent to the
<Escape> key.
Non-Editable Display Boxes:
The easiest example of this type of box is the Help box, or the
Info box. If there are more lines than fit within the box, up and
down arrow boxes will appear in the upper and lower right hand corners
of the box. By moving the mouse cursor to the corresponding box and
holding a mouse button down, the display will scroll in the
corresponding direction.
As expected, the right button exits.
List-Picking Boxes:
The best example of this type of dialogue box occurs when the
'directory list picker' pops up. Here, as in the Non-Editable Display
Boxes, up and down arrow boxes will appear if necessary. Furthermore,
moving the mouse cursor to a particular selection and pressing a
single left key will move the menubar to that selection.
Moving the mouse cursor to a particular selection and double left
clicking will select that particular selection as if you had moved the
menubar there and typed <return>.
As always, the right button is the equivalent of typing <Escape>.
Bingo 3.00 Reference Manual
36
The Mouse and The ASCII Table
-----------------------------
The mouse is also tightly integrated with the ASCII table
function, 'ascii_table'. Here, single left clicking on a character
moves the cursor to it (updating the display). Double left clicking
selects the character and adds it to the string.
Single left clicking on the [Bspace] bar is equivalent to typing
<backspace>; it removes one character from the string. A double left
click on this spot zeroes the string entirely.
As always, clicking the right button is the equivalent of typing
<Escape>.
Bingo 3.00 Reference Manual
37
Bingo & A Network
-----------------
Bingo will function quite well within the network environment,
but there are some concerns network administrators should be aware of.
Several operations cause Bingo to save temporary data to disk. Swap-
execution, automatic backups, and 'quit_and_save_status' all flush
data to disk files for storage.
By default, Bingo looks for an environment variable called "TEMP"
(first choice) or "TMP" (second choice). If found, it will be used as
a directory specification for storage of the above temporary files.
If neither of the two environment variables is defined, the root of
the current drive will be used.
This enables network administrators to set up Bingo so that users
can run the same executable, but by giving each user a seperate
definition of "TEMP" (or "TMP"), each user's temporary storage area
will be seperate from one another.
Bingo 3.00 Reference Manual
38
Bingo Function Summary
----------------------
This section will give a overview of the basic functionality
included in Bingo. For each section, detail for some of the more
intricate functions will be presented. After the narrative section, a
reference list for each function in the section will be presented.
The index at the end of the manual can be used as an alphabetical
cross-reference. Have fun!
Bingo 3.00 Reference Manual
39
Configuring Bingo
-----------------
Bingo is extremely configurable. To access the configuration
menu, select the 'Config' option from the main menu, or attach keys to
particular configuration functions.
To make the current selections permanent, select the "Write
setting" option found on the main configuration menu.
There is one item of interest of interest. There are nine
settings which as of version 2.01 are maintained on a per buffer
basis. These settings are the ones saved in profile files, and are
found on the 'Text Settings' config menu. Each time you change these
with a 'conf_' function, you change both the underlying default (used
when new files are brought in) and the current buffer's settings. For
a few settings, there are also 'toggle_' functions, such as
'toggle_cmode'. These change only the current buffer's settings.
As of version 2.11a, Bingo's runtime settings are kept in a
seperate file, BINGO.INI. This allows for far more flexibility.
Function List
----------------------------------------------------------------------
Save_settings
---------------------------------------------------------------------
Saves the current config settings to the file you name, usually
BINGO.INI. Upon startup, Bingo looks in the local directory then in
Bingo's execution directory for BINGO.INI.
Conf_color
----------------------------------------------------------------------
Configure the color settings. You select the color you are interested
in by pressing the appropriate color. Then, by watching the bottom
line on the screen and pressing the up and down arrow keys for the
foreground and the pageup and pagedown keys for the background, you
select the color you want. Pressing return will select the color.
For the Overscan (border) attribute, only the background attribute
matters.
Conf_lfs
----------------------------------------------------------------------
Alter the lfs-only setting. If on, this setting has Bingo write files
with lines separated by LF's only, in the UNIX fashion. Otherwise,
Bingo uses CR-LF pairs to delimit lines.
Bingo 3.00 Reference Manual
40
Conf_backups
----------------------------------------------------------------------
Allows you to specify the character Bingo uses to automatically create
backup files when a file is saved. The algorithm used takes the
character you give and uses it to flesh out the extension of the
original file to three characters; if the extension is already 3
characters long, the backup character replaces the third character of
the extension. For example, if the backup character is '$',
main.c becomes main.c$$
main.cp becomes main.cp$
main.pas becomes main.pa$
Conf_eof
----------------------------------------------------------------------
Alter whether Bingo writes a EOF character at the end of files (^Z).
Conf_search
----------------------------------------------------------------------
Allows you to pre-determine which flags (I/G/B/etc...) will be set
initially for a search and replace attempts.
Conf_stripping
----------------------------------------------------------------------
Configure whether Bingo strips the high bit of characters when
reading. Only really useful when reading Wordstar files.
Conf_rmargin
----------------------------------------------------------------------
Set the right margin. Affects paragraph reformatting and word wrap.
This changes the current buffer's setting and the global setting.
Conf_autoindent
----------------------------------------------------------------------
Set whether Bingo uses autoindent mode. Affects paragraph
reformatting and word wrap. This changes both the current buffer's
setting and the global setting.
Conf_wordwrap
----------------------------------------------------------------------
Set the word wrap mode. This changes both the current buffer's
setting and the global setting.
Conf_insert
----------------------------------------------------------------------
Alter whether Bingo is in insert/overwrite mode. This changes both
the current buffer's setting and the global setting.
Conf_tabsize
----------------------------------------------------------------------
Set the tabsize. This changes both the current buffer's setting and
the global setting.
Bingo 3.00 Reference Manual
41
Conf_backspace
----------------------------------------------------------------------
Configure the backspace mode:
1. Delete single chars
2. Delete spaces back to tab setting
3. Delete spaces to left margin
4. Rubout
This changes both the current buffer's setting and the global setting.
Conf_cmode
----------------------------------------------------------------------
Configure whether Bingo uses C Mode on *.c and *.h files. Allows you
to choose between two different modes of C indention:
for(i=0;i<10;i++){ and for(i=0;i<10;i++)
...stuff... {
} ...stuff...
}
This changes both the current buffer's setting and the global setting.
Conf_sound
----------------------------------------------------------------------
Allows you to set the frequency of the beep Bingo uses. Setting it to
zero will effectively turn off the sound.
Conf_mdelay
----------------------------------------------------------------------
Allows you to specify the timing delay between repetitions of a
function(s) being executed while a mouse button is held down. For
example, on reasonably quick machines, paging down while holding the
mouse button down on one of the status line "hotspots" occurred so
fast with version 2.0 so as to be useless.
Conf_button_wait
----------------------------------------------------------------------
Allows you to configure, in milliseconds, the amount of delay Bingo
will wait for the second click of a double click.
Conf_shadow
----------------------------------------------------------------------
Silly function, configures whether Bingo uses "shadow" boxes. Play
with it, amaze your friends.
Conf_win_close
----------------------------------------------------------------------
Controls whether Bingo automatically closes a window when the file is
closed.
Bingo 3.00 Reference Manual
42
Conf_def_ext
----------------------------------------------------------------------
Allows you to specify the file extensions Bingo will attempt to use
when you specify a filename without '.'. The extensions are checked
in order.
Conf_video_mode
----------------------------------------------------------------------
Allows you to choose from between three screen handling options:
- autodetect with retrace checking
- autodetect with no retrace checking
- 43 or 50 line mode, if supported
Retrace checking will only be in effect if there are only 25 lines to
be displayed.
Conf_prn
----------------------------------------------------------------------
Set the printer destination, between the default serial port, the
default parallel port, or a file.
Conf_tmarg
----------------------------------------------------------------------
Set the top margin, in terms of number of lines.
Conf_bmarg
----------------------------------------------------------------------
Set the bottom margin, in terms of number of lines.
Conf_lmarg
----------------------------------------------------------------------
Set the left margin which will be used when printing, in terms of
spaces.
Conf_lines_per
----------------------------------------------------------------------
Set the lines per page, counting the top margin.
Conf_kill_size
----------------------------------------------------------------------
Alters the size of the kill buffer.
Conf_cut_stack
----------------------------------------------------------------------
Allows you to choose whether text about to be discarded from the paste
buffer should be placed on the stack. If this is on, this will slow
block operations down a bit, but it is a nice safety feature.
Bingo 3.00 Reference Manual
43
Conf_auto_cut
----------------------------------------------------------------------
Allows you to toggle how the 'cut' & 'copy' functions respond when no
block has been marked. If auto cut is active, these functions will
cut (or copy) the current line. If auto cut is not active, the
current line will be Linemarked.
Conf_smart_tabs
----------------------------------------------------------------------
Allows you to specify whether or not "Smart" tabs are active. Smart
tabs cause the 'insert_tab' function to tab over to the same column as
the next nonspace character on the line previous. This changes both
the current buffer's setting and the global setting.
Conf_matching
----------------------------------------------------------------------
Configures matching mode. If matching mode is active, entering a
'[{<(' character will cause its matching close member to be entered
automatically. This changes both the current buffer's setting and the
global setting.
Conf_trail
----------------------------------------------------------------------
Allows you to configure whether or not Bingo automatically strips
trailing spaces.
Conf_bounce
----------------------------------------------------------------------
Allows you what cursor movement paradigm Bingo uses. If Bounce mode
is active, Bingo views the entire document as one long string of
characters. Thus, you cannot move off of exiting text. Further, the
cursor will automatically wrap at the end of lines. If Bounce mode is
turned off, cursor movement is by the more traditional method, where
you can move any where (horizontally) you wish.
Conf_key_bios
----------------------------------------------------------------------
This governs whether or not Bingo will use the Extended Keyboard Bios
if it is found. On some machines, Bingo may identify it incorrectly,
or there may be compatibility problems. This function allows you to
tell Bingo to disregard the extended Bios, even if it is found. If
this is on, the two sets of arrow keys, for example, will be
recognized as different. They will therefore have to be defined
separately in your keyboard config file.
Conf_erronly
----------------------------------------------------------------------
Allows you to tell Bingo to further restrict valid error lines to
those containing the word 'error' (any case).
Bingo 3.00 Reference Manual
44
Conf_mouse
----------------------------------------------------------------------
Controls whether or not Bingo uses a Mouse, if it finds one.
Conf_profile
----------------------------------------------------------------------
Controls whether Bingo will check for, and load if found, the profile
file of a file's file extension each time a file is loaded.
Conf_word
----------------------------------------------------------------------
Allows you to edit the string containing what characters are not part
of a word.
Conf_scr_save
----------------------------------------------------------------------
Controls whether Bingo will save, and then restore, the DOS screen
upon startup and exit. Will cost you some memory.
Conf_name_save
----------------------------------------------------------------------
Controls whether, and how, Bingo saves the last 15 files edited. You
can turn it off, tell it to save the info in the current directory
(where Bingo looks first upon startup), or in Bingo's home directory.
Conf_delims
----------------------------------------------------------------------
Allows you to input and edit pairs of delimiters for Bingo to balance
with the 'match_delim' function. Both delimiters must be non-blank.
Conf_eol_display
----------------------------------------------------------------------
Allows you to enter the ASCII decimal value of the character to be
displayed as the end of line character. The default is 32, the space
character.
Conf_exit_to_pick
----------------------------------------------------------------------
Controls Bingo's actions upon exit. If turned on, Bingo will popup an
edit box when you quit the program (except when you exit through the
abort_all function).
Conf_prn_eol
----------------------------------------------------------------------
Controls whether Bingo terminates lines with a linefeed only or a
carraige return/linefeed pair while printing.
Conf_prn_lineno
----------------------------------------------------------------------
Sets whether or not Bingo prints line numbers on each line it prints.
Bingo 3.00 Reference Manual
45
Conf_prn_header
----------------------------------------------------------------------
Sets whether or not Bingo prints page headers on each page it prints.
Headers consist of the filename, the page number, and the date/time.
Conf_timed_backups
----------------------------------------------------------------------
Allows you to specify how often, in terms of changes, to save a backup
of a file. A value of zero (0) indicates no automatic backups are to
take place. The value input becomes the defult value for any
subsequently entered files, and becomes the value for the current
file; it does not change the value for any existing files. Any
operation which changes the file will increment the change counter.
The current number of changes for each file is displayed on the info
screen. When the predetermined number of changes has occurred, the
file is saved as
backXXXX.bak
where XXXX is the buffer 4 digit id number. This id number is
unique over an editing session, and is displayed as part of the info
screen. The backup files are identical to the files themselves,
except that the first line contains the original name of the file
(full pathname) and the time of the backup. So if there is a
catastrophic failure (your cat chews through the power cord, for
instance), you can explore the back*.bck files and recover recent
version of your files.
The *.bak files are stored in the location specified by the
"TEMP" (or "TMP") environment variable; if this environment variable
is not set the files will be stored in the root directory of the
current drive.
*Note*: Be very careful with setting this value. Generally, a
setting between 256 and 1024 is very useful. However, if you are
editing a multi-megabyte file, backups can be a large pain
because of the time involved in saving the file.
Conf_carriage
----------------------------------------------------------------------
This function toggles on and off whether or not the 'carraige'
function splits lines.
Conf_delete_join
----------------------------------------------------------------------
This function toggles on and off whether or not deleting at the end of
a line brings the next line up.
Conf_wild_load
----------------------------------------------------------------------
This function is used to control how Bingo interprets wildcard
characters in filenames. There are 4 choices:
- never load wildcard matches automatically
- load wildcard matches only at startup
- load wildcard matches every *but* startup
Bingo 3.00 Reference Manual
46
- always automatically load wildcard matches
Bingo 3.00 Reference Manual
47
Conf_chess_trace
---------------------------------------------------------------------
This is used to turn on the Chess execution trace capability. When
enabled, each Chess program executed will stop at each line and
display it. You will be able to continue execution or halt it.
Conf_dialogue
----------------------------------------------------------------------
This is used to set whether string, yes/no, and character dialogue
takes place in bordered boxes in the center of the screen or at the
bottom of the screen.
Bingo 3.00 Reference Manual
48
Basic Editing
-------------
Basic editing concerns deletion and insertion of characters.
Bingo provides a number of ways to delete text without recourse to the
block operation. Five of these operations push deleted text onto the
unkill stack -- 'del_eol', 'del_line', 'del_bol', 'del_word_lt', and
'del_word_rt'.
The Destructive Backspace
-------------------------
Bingo supports four backspace deletion modes. The first is the
old favorite, the simple one character destructive backspace. The
second mode destructively deletes back to the previous tab stop,
provided there are only spaces in the way. If there are non-space
characters in the way, it functions as in mode 1.
The third mode deletes all the way to the left margin (column 1),
provided it consists only of spaces. Again, if there are non-space
characters, it functions as mode 2.
The fourth mode is termed a rubout. In this mode, Bingo will
backup one character and overwrite that character with a space.
The 'Default_' Functions
------------------------
Bingo has two deletion functions which are variations on others.
The 'default_bspace' function is a variation on the 'back_space'
function while the 'default_del' function is a variation on the
'del_char'. Both work in essentially the same manner. If a block is
marked, a 'cut' function is performed. If no block is marked, the
corresponding function.
Function List
----------------------------------------------------------------------
Insert_tab
----------------------------------------------------------------------
Insert the number of spaces needed to move the cursor to the next tab
stop, based on the current tabsize.
Carriage
----------------------------------------------------------------------
If the 'conf_carraige' setting is turned on, this function splits the
current line by moving the cursor to the start of the next line,
taking everything to the right of the cursor along for the ride. If
this moves you onto the bottom line of the window, the line will be
centered on the screen. Depending on C mode and the AutoIndent mode
settings, automatic indentation of some type may be performed. If the
'conf_carraige' setting is turned off, this function simply moves the
cursor down one line.
Bingo 3.00 Reference Manual
49
Toggle_ins
----------------------------------------------------------------------
Toggles the insert/overwrite mode. Changes only the setting of the
current buffer.
Toggle_wrap
----------------------------------------------------------------------
Toggles the word wrap setting. Changes only the setting of the current
buffer.
Toggle_cmode
----------------------------------------------------------------------
Toggles the C mode setting, regardless of the file name. Changes only
the setting of the current buffer.
Toggle_autoindent
----------------------------------------------------------------------
Toggle the autoindent setting. Changes only the setting of the
current buffer.
Del_char
----------------------------------------------------------------------
Deletes the current character at the cursor position; if it was at the
end of a line and the 'conf_delete_join' setting is turned on, brings
the next line up.
Back_space
----------------------------------------------------------------------
If the 'conf_delete_join' setting is turned on, performs a destructive
backspace, if the current deletion mode is not Rubout. If the current
mode is Rubout, the cursor will back up one space and the current
character will be blanked.based on the current deletion mode in
effect. If the setting is turned off, performs a rubout.
Del_line
----------------------------------------------------------------------
Deletes the entire current line, regardless of position.
Del_eol
----------------------------------------------------------------------
Deletes all text to the end of the line; if at the end of a line,
joins the lines if the 'conf_delete_join' setting is turned on.
Del_bol
----------------------------------------------------------------------
Deletes all text to beginning of line, moves to first column. If at
the beginning, joins the line with the previous line if the
'conf_delete_join' setting is turned on.
Bingo 3.00 Reference Manual
50
Default_del
----------------------------------------------------------------------
Does one of two things depending on whether or not a block is marked.
If a block is marked, the 'cut' function is executed. If no block is
marked, the 'del_char' function is executed.
Default_bspace
----------------------------------------------------------------------
Similar to 'default_del', except that if no block is marked, a
'back_space' function is executed.
Del_word_rt
----------------------------------------------------------------------
Deletes from the current cursor position to the start of the next word
to the right.
Del_word_lt
----------------------------------------------------------------------
Deletes from the current cursor position to the start of the next word
to the left.
New_line
----------------------------------------------------------------------
Inserts a new line before the current line, without moving the cursor.
Bingo 3.00 Reference Manual
51
Block Handling
--------------
Marking
-------
Block marking is extremely flexible. Three types of marking are
supported. Line marking considers lines to be the smallest
indivisible chunks of text. It is primarily used when editing large
sections of program code, since much of this type of editing involves
moving lines.
Point marking, on the other hand, considers single characters to
be the smallest indivisible portions of text. this is useful for
replicating portions of lines, rather than whole lines.
While Point marking "snakes" the mark from one point to the next,
Vertical marking lets you define corners of a column-oriented block.
There are two methods of marking, governed by the 'conf_automark'
function. If auto-marking is turned off, marking proceeds as follows:
go to the beginning of the block you wish to mark; execute the
appropriate mark function for the block type you are interested in;
move to the end of the block you wish to mark; mark again.
If automarking is turned on, things work differently. Now, when
you mark, you turn marking 'on'. As you move about the file, the
block will follow you until you decide to mark the end. However, you
do not have to mark the end of the block; Bingo will simply assume the
current position is the other end of the block.
You can also use the 'extend_mark' function. This simply extends
the current marking scheme to the current cursor position. If there
is no mark in the file, 'Extend_mark' will display an error message.
Operations on Blocks
--------------------
Bingo supports two slightly different sets of block operations.
The first set will be familiar to users of many programming editors,
while the second will bring back memories of any Wordstar compatible
editor they may have used.
The first set of operations consists of three functions: 'cut',
'copy', 'paste'. 'cut' snips the marked region to the block buffer,
removing it from the file. 'copy' does the same thing, but it leaves
the marked text intact in the file. In both cases, if nothing is
marked and you have this option turned on, Bingo will assume you wish
the current line to be linemarked.
'paste' is very simple: whatever is currently in the block buffer
is placed at the current cursor position, based on the marking method
used. If the contents were point marked, the contents are simply
'squirted' into the text. If the contents were line marked, the lines
are inserted above the current line.
There is also an alternate type of paste operation, that of
'paste_replace'. In this case, the paste buffer's contents overwrite
the needed amount of space in the text, rather than squirting between
existing text. This type of pasting will only work for Column and
Line marked blocks. Be careful! You can hurt yourself with this one.
Bingo 3.00 Reference Manual
52
The second type of block operations available are similar in
nature to those used by Wordstar-compatible editors. Block operations
consist of three steps: mark the text, move to the destination
position, invoke the function.
'block_move' moves the currently marked blocked of text to the
current cursor position. 'block_copy' does the same thing, except it
leaves a copy behind. 'block_move' and 'block_copy' will not allow
you to manipulate blocks between files.
'block_delete' is functionally identical to Cut, except that it
requires that a block be marked; the setting of the auto linecut
toggle has no effect on 'block_delete'.
Remember that since each file can have independently marked
sections of text, you cannot use the 'block_move' & 'block_copy'
functions to manipulate text between seperate files.
Named Buffers
-------------
In addition to the default paste buffer, Bingo supports 26 named
buffers, 'a'-'z'. In order to change which buffer is currently in
use, use the 'name_buffer' function. Press the letter of the buffer
you want, or <return> for the default buffer. Until you change the
buffer, Bingo will use the currently named buffer for all its
operations. All buffers will be saved when a swapping operation is
being done.
Emacs_yank
----------
This function melds the unkill stack and the paste buffer
together in the following manner. If the most recent block
operation/deletion was a block operation, 'emacs_yank' works exactly
like 'paste', pushing the paste buffer contents into the text. If the
most recent operation was a deletion (word, line, -eol, -bol),
'emacs_yank' works like the 'paste_kill' function, pulling text from
the undo stack without disturbing its contents. This allows you to
use the deletion commands to manipulate text in concert with the paste
buffer operations. Note that this is not identical to EMACS's 'yank'
functionality, but it is useful.
Function List
----------------------------------------------------------------------
Line_mark
----------------------------------------------------------------------
Drop a line marker. The block will be expanded or shrunk, depending
on the last drop made. Line marks consider the line to be the
smallest markable element of text.
Point_mark
----------------------------------------------------------------------
Drop a point marker. The block will be expanded or shrunk, depending
on the last drop made. Point marks consider the character to be the
Bingo 3.00 Reference Manual
53
smallest markable element of text.
Vertical_mark
----------------------------------------------------------------------
Drop a vertical marker. Vertical, or column, blocks are defined by and
upper and an opposing lower corner.
Extend_mark
----------------------------------------------------------------------
Extends the current marked block, using whichever marking scheme is in
place. Does nothing if no block is marked.
Unmark
----------------------------------------------------------------------
Unmark all text in current buffer.
Cut
----------------------------------------------------------------------
Cut the marked text to the block buffer. The marked text is deleted
from the file.
Copy
----------------------------------------------------------------------
Copy the marked text to the block buffer. The marked text is NOT
deleted from the file.
Bingo 3.00 Reference Manual
54
Paste
----------------------------------------------------------------------
Pastes the contents of the block buffer into the text at the current
position. If the contents were linemarked, the contents will be
pasted, as lines, above the current line.
Paste_replace
----------------------------------------------------------------------
Pastes the contents of the block buffer at the current location,
overwriting the needed amount of space. This is only valid when the
paste buffer is Line or Vertical marked.
Block_move
----------------------------------------------------------------------
Moves the currently marked blocked of text to the cursor position.
Block_copy
----------------------------------------------------------------------
Copies the currently marked blocked of text to the cursor position.
Block_delete
----------------------------------------------------------------------
Deletes the currently marked block of text to the block buffer;
identical to cut.
Block_save
----------------------------------------------------------------------
Writes the currently marked text to a file.
Swap_buf_and_block
----------------------------------------------------------------------
Takes the currently marked portion, and swaps it with the current
contents of the paste buffer. The two blocks need not be of the same
type.
Report_bsize
----------------------------------------------------------------------
Reports the number of lines and characters (line breaks in point
marked blocks count as one character) the currently marked block
spans.
Name_buffer
----------------------------------------------------------------------
Allows you to change the current paste buffer. <return> specifies the
default buffer, and 'a'-'z' specify their respective buffers.
Buffer_info
----------------------------------------------------------------------
Displays various pertinent information about all the paste buffers.
Bingo 3.00 Reference Manual
55
Look_buffer
----------------------------------------------------------------------
Displays the contents of the current buffer in a non-editable window.
This only displays up to the first 100 lines in the buffer.
Cut_append
----------------------------------------------------------------------
Works exactly like 'Cut', except it appends the marked text to the
current contents of the buffer. The text in the buffer and the marked
text must be of the same type.
Copy_append
----------------------------------------------------------------------
Just as 'Cut_append', but performs a copy instead.
Emacs_yank
----------------------------------------------------------------------
Melds the unkill stack and the paste buffer together. If the most
recent block operation/deletion was a block operation, 'emacs_yank'
works exactly like 'paste', pushing the paste buffer contents into the
text. If the most recent operation was a deletion (word, line, -eol,
-bol), 'emacs_yank' works like the 'paste_kill' function, pulling text
from the undo stack without disturbing its contents. This allows you
to use the deletion commands to manipulate text in concert with the
paste buffer operations.
Mark_word
----------------------------------------------------------------------
This marks the current word, using the defined word characters. Only
legal word text is marked.
Bingo 3.00 Reference Manual
56
Error Parsing and Undo
----------------------
How Error Parsing Works
-----------------------
Bingo provides the capability to automatically parse compiler
generated error messages. The procedure for this is fairly simple.
First, you must have a text file containing the error output of
the compiler (or assembler) in question. This usually obtained by
running said compiler and redirecting its output to a file. Bring
this file into the editor.
Next, call the 'setup_err_parse' function, and give it the name
of the file. If the name matches a file in the ring, Bingo will tell
you that error processing is setup properly.
Now it is simple; simple call the 'next_error' or 'prev_error'
functions. The following things will happen:
1) Bingo will see if a next (or previous) error can be found.
If not, it will report that no more errors exist.
2) Assuming an error line is found, the filename and line
number will be picked out of the line. Bingo will perform and
edit_file operation on the filename, then jump to the offending
line. All of this will happen within the current window.
3) Also, any onscreen window which contains the file being
parsed will be updated. The current error line will be
highlighted automatically.
As you can see, error parsing is super useful. For a further example
of how it works, see the example macro in the section on the KEYCFG
program.
Error Parsing Method
--------------------
Bingo parses error files using a "fuzzy" or "best-guess"
algorithm. It checks each line as follows.
First, Bingo attempts to find a valid filename on the line. The
filename must contain a period, and it must have a file extension.
The filename cannot be a .EXE or .COM file, and it may contain the
full path specification (new with version 2.10e).
After finding such a filename, Bingo verifies that the named file
exists on disk or in the current ring. If it does, Bingo now begins
to look for the line number within the error file. Bingo will look
for the first number to follow the filename, and use this as the line
number.
If both a filename & a line number are found, the line will be
recognized as a valid error/warning line.
This algorithm will work for the Borland and Microsoft
developmental tools. However, in some cases, you may have to consult
your manual in order to find what command-line switches have to be set
for your compiler to output errors in a usable message format.
Bingo 3.00 Reference Manual
57
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!! Note that linker errors do not !!!!!!!!!
!!!!!!!! have line numbers, and so will !!!!!!!!!
!!!!!!!! not be recognized. !!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
However, whenever Bingo encounters a situation where there are no more
errors, it will display a message saying so. Further, it will display
a portion of the last non-blank line in the error file on the message
line with the "No more Errors" message, so you can verify that all
went well.
Undo Capabilities
-----------------
Bingo has several capabilities to allow you to recover from
recent mistakes. The 'Restore_line' function, will simply recall the
state of the current line to what it was when you first arrived. This
is good only as long as you do not move from the line; once you leave
the line, its original state is lost forever.
This type of error-recovery is good for small things, but
something more substantial was needed. So Bingo keeps a stack of
recently deleted items; text deleted by 'del_eol', 'del_bol', and
'del_line' functions. This stack is kept in reverse order; that is,
the most recently deleted text is placed in top of the undo stack.
Additionally, you have an option regarding text cut to the paste
buffer. Normally, when you place text into the paste buffer (Using
the 'cut', 'copy', etc. functions), if the paste buffer already
contains something, that text is discarded. However, if you set the
'cut to stack' option on (in the General Config Menu, or with the
'conf_cut_stack' function), this text will be pushed onto the stack
also.
You can control the size of the undo stack using the
'conf_kill_size' function (1 to 10240 lines), or through the config
menus. You cannot, however, turn it off.
Manipulating the Undo Stack
---------------------------
There are three functions available to help you deal with the
undo stack. 'rotate_kill' will popup a list of the current stack's
contents. By moving the menu bar and hitting return, you can move the
selected entry to the top of the stack.
'unkill' and 'paste_kill' are very similar. They take the top
member of the stack and insert it in the current position. If the top
member of the stack was a full line, it will be inserted above the
current line. 'unkill' also removes the top member from the stack.
Bingo 3.00 Reference Manual
58
Function List
----------------------------------------------------------------------
Setup_err_parse
----------------------------------------------------------------------
This function will prompt you for a filename. Bingo will from then on
use the named file as the error file. This must be called before
next_error, prev_error, or last_error are called.
Next_error
----------------------------------------------------------------------
Moves, within the current window, to the next error as found in the
current error file. If no more errors can be found, Bingo will say
so, and display the last non-blank line in the error file. Otherwise,
Bingo will edit the appropriate file into the current window, as well
as highlighting the line in the error file being referenced.
Prev_error
----------------------------------------------------------------------
Same as error except it moves backward through the error file.
Last_error
----------------------------------------------------------------------
Redisplays the last error message, if there was one.
Rotate_kill
----------------------------------------------------------------------
Pops up the current kill stack and allows you to arbitrarily move a
line of text to the top of the stack.
Unkill
----------------------------------------------------------------------
Inserts the top member of the stack at the current position. If the
top member of the stack was a full line, it is inserted above the
current line. Removes the top member from the stack.
Paste_kill
----------------------------------------------------------------------
Inserts the top member of the stack at the current position. If the
top member of the stack was a full line, it is inserted above the
current line. Leaves the stack itself alone.
Restore_line
----------------------------------------------------------------------
Restores the current line to its former form.
Bingo 3.00 Reference Manual
59
File Handling
-------------
Bingo has extensive file handling capabilities, more than almost
any other editor available. Literally, there is little you could want
to do with a file which Bingo will not let you do.
A couple of words are in order about the file format. Bingo
cares not at all if the file you are reading is delimited by carriage-
return/linefeed pairs or just linefeed characters; Bingo will read
both with equal aplomb. Similarly, Bingo doesn't object to files
ending with the EOF character (ASCII 26). On output, the output
format is governed by the configuration settings accessible through
the 'conf_eof' and 'conf_lfs' functions.
Function List
----------------------------------------------------------------------
Edit_file
----------------------------------------------------------------------
Asks for a filename. If the file is already in the ring, it simply
switches to it. If it is not in the ring, it loads the file.
Choose_file
----------------------------------------------------------------------
Pops up a list of current files in the ring, and an option for a new
file. Selecting the New File option performs an 'edit_file' function.
Load_file
----------------------------------------------------------------------
After asking for a filename, it loads that file from disk. If the
file is already in the ring, the in-memory version is first deleted
from memory.
Rename_file
----------------------------------------------------------------------
Renames current file. Does not save it to disk automatically.
Switch_file
----------------------------------------------------------------------
Switches to a different file, performing a quit on the current file
first. If you escape out of the quit option, the switch operation
will abort.
Save_file
----------------------------------------------------------------------
Saves the current file; does not exit.
Modify_save
----------------------------------------------------------------------
Saves current file ONLY if it has been modified.
Bingo 3.00 Reference Manual
60
Quit
----------------------------------------------------------------------
Exits current file. If the file was modified, it will ask you if you
wish to save the file; a <return> indicates yes.
Abort
----------------------------------------------------------------------
Exits the file, no protection, no save.
File
----------------------------------------------------------------------
Saves and exits current file.
Next_file
----------------------------------------------------------------------
Moves to the next file in ring.
Prev_file
----------------------------------------------------------------------
Moves to the previous file in the ring.
Quit_all
----------------------------------------------------------------------
Performs a quit on each file in the ring.
Abort_all
----------------------------------------------------------------------
Aborts all files, no questions asks.
File_all
----------------------------------------------------------------------
Saves and exits all files.
Save_all
----------------------------------------------------------------------
Saves all files.
Modify_save_all
----------------------------------------------------------------------
Saves each modified file in the ring.
Delete_file
----------------------------------------------------------------------
Asks for a filename to delete on disk.
Zap_file
----------------------------------------------------------------------
Delete's the disk copy of the current file.
Bingo 3.00 Reference Manual
61
Block_load
----------------------------------------------------------------------
Loads a file from disk into the current position of the file.
Clean_file
----------------------------------------------------------------------
Resets the 'modified' status of the file to FALSE.
Clean_all
----------------------------------------------------------------------
Resets the 'modified' status of all files in the ring to FALSE.
Backup_file
----------------------------------------------------------------------
Forces a backup attempt for the current file; this will only have an
effect if the file's timed backup setting is on.
Backup_all
----------------------------------------------------------------------
Forces a backup attempt on each file in the ring. For each file, this
will only have an effect if the file's timed backup setting is on.
Bingo 3.00 Reference Manual
62
Info
----
Function List
----------------------------------------------------------------------
Help
----------------------------------------------------------------------
The 'help' function attempts to read the file BINGO.HLP located in the
same directory as BE.EXE. This file can consist of anything you wish,
and contain up to 1000 lines as you wish (it must fit into memory...).
Info
----------------------------------------------------------------------
This function simply brings up some useful info, such as the size each
file will be when written to disk, current date and time, etc.
Ascii_table
----------------------------------------------------------------------
This function serves a dual purpose. First, it will pop up a display
of all 256 characters, serving as a handy reminder of the characters
available. As you move the cursor over the table, the decimal, octal,
hexadecimal, and mnemonic values, if appropriate.
Further, by moving onto a particular character and hitting
return, you will add this character to the string displayed at the
top. You can build a string up to about 30 characters in length. The
<Backspace> key will delete the last character on the string. When
you press <Escape> to leave, the contents of the string will be
inserted into the text at the current cursor position.
Version_info
----------------------------------------------------------------------
Displays various version information and the name of the person this
copy was registered to, if it is a registered copy.
Main_menu
----------------------------------------------------------------------
Invokes the main menu.
Bingo 3.00 Reference Manual
63
Macros
------
Bingo provides tremendous support for the creation, management,
and execution of keyboard macros. This level of support was initially
dictated by my own experiences developing software, and later added to
by user feedback.
Bingo retains the status of the last function executed internally
as a True or False value; you can see this reflected on the far right
end of the active status line. If, during the execution of a macro a
function returns a False value, the macro will terminate. Further, if
applicable, the repeat command will terminate. This allows you to
execute macros "until function failure" based on things like trying to
move beyond the beginning of the line.
Also, you can terminate the execution of a macro by pressing the
Scroll Lock key and holding it until the macro terminates.
Macro Space
-----------
Bingo will dynamically increase its macro space to compensate
when you add or release memory. Thus, macro space is limited by
available memory.
Defining Macros
---------------
There are four ways to define macros, all very similar. You can
define the scrap key to hold a macro, a single key to hold a macro,a
two key combination to hold a macro, or a three key combination to
hold a macro. Any of these functions will also end a macro definition
if one is currently in progress. Macros can be defined across any
number of activities. Pressing <Escape> at any time as the response
to a query from Bingo will end the macro presently being recorded.
Ending Macro Definition
-----------------------
When you wish to end a macro definition, you can use any of the
macro functions which would start a macro definition ('onekey_def',
'twokey_def', 'threekey_def', 'define_scrap') as well as the
'end_macro' function. It is important to have at least one of these
functions direclty assigned to a key; if you use them from the menu,
you will record the keystrokes leading to them menu as well!
Saving Macros
-------------
Using the single key save and load functions, you can save
favorite macros to named files for later recall. Single saving also
saves the key sequence the macro is attached to, and loading it in
again will redefine the key.
Bingo 3.00 Reference Manual
64
Saving the Entire Key Set
-------------------------
Bingo also allows you to save the entire key table, including all
key assignments and all macros, for later recall. Recalling a keyset
file will overwrite the entire key table, so be warned.
When you save a keyset file, you can name the keyset file, and
you can have it saved in Bingo's home directory or in an arbitrary
directory. If you name it Keycfg.set, it becomes the default file
keyset, depending where you put it. When Bingo starts up, it looks
first in the current directory, then in its home directory for
KEYCFG.SET. This allows you to have multiple key configurations in
different disk locations while still maintaining one executable.
Executing a Macro File
----------------------
You may also execute any macro which was single saved to a file
at any time. This executes it one, without disturbing the current key
table assignments. Good for macros used infrequently, but which are
very useful. I have a whole library of interesting ones saved at this
point.
Function List
----------------------------------------------------------------------
Define_scrap
----------------------------------------------------------------------
Start scrap macro definition.
Onekey_def
----------------------------------------------------------------------
Start single-key macro definition.
Twokey_def
----------------------------------------------------------------------
Start two-key macro definition.
Threekey_def
----------------------------------------------------------------------
Start a three-key macro definition.
Scrap
----------------------------------------------------------------------
Execute the scrap macro.
Single_key_save
----------------------------------------------------------------------
Save a single macro to a file for later recall. Saves the key it is
attached to also.
Bingo 3.00 Reference Manual
65
Single_key_load
----------------------------------------------------------------------
Load a single macro from a file. Overwrites the current definition
for the key, if it has one.
Key_set_save
----------------------------------------------------------------------
Saves entire keyset, including macros, but not the scrap.
Key_set_load
----------------------------------------------------------------------
Load entire keyset.
Run_macro_file
----------------------------------------------------------------------
Runs a macro from a file saved with single_key_save.
Undefine_key
----------------------------------------------------------------------
Undefines a key.
End_macro
----------------------------------------------------------------------
Ends the recording of a current macro. Mostly useless, but it made
for a useful menu entry.
Bingo 3.00 Reference Manual
66
Navigation
----------
Navigation in Bingo is very straightforward. You may move in
terms of characters, lines, words, windowfuls, and the entire file.
You can also jump to the beginning and end of a marked block.
Finally, you can jump to a specified line, or by a relative number of
lines, or to a column, or by a relative number of columns, or by both
lines and columns in the file using the Jump function.
In addition, Bingo supports placemarks. I had never really used
placemarks much, or "bookmarks" as they are sometimes called. But a
buddy of mine told me to try them when in big files, and I was
impressed. But the editor I tried them in allowed only one; this is
just not enough. So I went one better. Actually, I went 9 better.
Bingo provides 10 placemarks. You can drop one, jump to one, or
pop up a list of the current placemarks. Each placemark defines a
file, a line, and a column. When you try to jump to a placemark and
the file it pertains to is not in the ring, the file will be fetched.
Function List
----------------------------------------------------------------------
Down_page
----------------------------------------------------------------------
Moves down one windowful.
Bingo 3.00 Reference Manual
67
Up_page
----------------------------------------------------------------------
Moves up one windowful.
Cursor_right
----------------------------------------------------------------------
Moves right one char; wraps if necessary and if bounce mode is active.
Cursor_left
----------------------------------------------------------------------
Moves left one char, wraps if necessary and if bounce mode is active.
Cursor_up
----------------------------------------------------------------------
Moves up one line.
Cursor_down
----------------------------------------------------------------------
Moves down one line.
Back_tab
----------------------------------------------------------------------
Moves back to the previous tab stop. Does not change the text at all.
Begin_line
----------------------------------------------------------------------
Goes to beginning of line.
End_line
----------------------------------------------------------------------
Goes to end of line.
Top_of_file
----------------------------------------------------------------------
Jump to top of file.
Bot_of_file
----------------------------------------------------------------------
Jump to bottom of file.
Next_word
----------------------------------------------------------------------
Goes to beginning of next word.
Prev_word
----------------------------------------------------------------------
Goes to beginning of previous word.
Top_of_screen
----------------------------------------------------------------------
Jumps to the top of screen.
Bingo 3.00 Reference Manual
68
Bottom_of_screen
----------------------------------------------------------------------
Jumps to the bottom of screen.
Top_of_block
----------------------------------------------------------------------
Jumps to the top of marked block.
Bottom_of_block
----------------------------------------------------------------------
Jumps to the bottom of marked block.
Jump
----------------------------------------------------------------------
Jump to position, column, line or both. The format is:
[(+/-)row][,(+/-)column]
If the number is prefaced with a '+' character, Bingo will jump the
relative distance forward. If the number is prefaced with a '-'
character, Bingo will jump the relative distance backwards. Otherwise
the number will be interpreted as an absolute. Either number, or
neither, may be ommitted.
Center_line
----------------------------------------------------------------------
Makes the current line the center line of the current window, and
repaint the entire screen, all windows.
Begin_of_text
----------------------------------------------------------------------
Moves the cursor to the first non-space character on the current line.
Indent_up
----------------------------------------------------------------------
Moves to previous line with same indentation scheme as current line.
Indent_down
----------------------------------------------------------------------
Moves to next line with same indentation scheme as current line.
Snap_to_mouse_xy
----------------------------------------------------------------------
Moves the cursor to the current mouse position, changing windows if
necessary.
Mouse_scroll
----------------------------------------------------------------------
Moves the cursor to the mouse position when the mouse button is
released; while the button is depressed, the file will scroll up and
down, depending on where the mouse cursor is moved. The closer the
cursor is to the top and bottom of the window, the faster the file
will scroll.
Bingo 3.00 Reference Manual
69
Place_mark
----------------------------------------------------------------------
Drops a placemark, inquiring as which of the 10 allowed (0-9) you are
concerned with. Each placemark contains the filename, the line, the
column.
Jump_mark
----------------------------------------------------------------------
Jumps to the specified placemark. If the specified filename is not in
the ring, Bingo will go and get it.
Show_marks
----------------------------------------------------------------------
Pops up a window showing the current placemarks in effect for this
editing session.
Scroll_up
----------------------------------------------------------------------
Scroll the display up one line, keeping the cursor in its same place.
Scroll_down
----------------------------------------------------------------------
Scroll the display down one line, keeping the cursor in its same
place.
Scroll_left
----------------------------------------------------------------------
Scrolls the screen to left (the text to the right).
Scroll_right
----------------------------------------------------------------------
Scrolls the screen to right (the txt to the left).
Bingo 3.00 Reference Manual
70
System Operations
-----------------
Bingo supports a number of system operations. While they are not
large in number, they are large in utility.
Simple Execution & Shelling
---------------------------
The 'exec_command' function simply executes a given DOS command
line and returns. It does not do anything fancy, and Bingo will
remain in memory (consuming quite a bit of memory) but it is fast and
simple for issuing short commands.
The 'shell' function is identical to 'exec_command', except it
takes no arguments. It simply gives you a DOS shell.
Swap Execution & Shelling
-------------------------
More often than not, particularly in the case of executing
command-line compilers, you simply can't afford to let Bingo hang
around in memory, since it consumes a bit. So Bingo provides two
other methods for executing commands. While they appear identical in
form and function to the previous pair of functions, 'swap_execute' &
'swap_shell', are much more interesting.
While they, too, execute a command or shell to DOS, prior to
doing so, they save all relevant information such as copies of the
current files, etc., then swap Bingo out of memory. When this
happens, a ~3k kernel is left behind to manage things until the
command is finished; then it will reload Bingo. Notice that the
method of Bingo swapping out is now much different with version 3.00;
thanks to Ralf Brown's excellent swapping routines.
Function List
----------------------------------------------------------------------
Chdir
----------------------------------------------------------------------
Change the currently logged directory.
Exec_command
----------------------------------------------------------------------
Execute a DOS command, while leaving Bingo completely resident in
memory.
Shell
----------------------------------------------------------------------
Shell to DOS, leaving Bingo completely resident in memory.
Swap_execute
----------------------------------------------------------------------
Execute a DOS command while swapping Bingo out, leaving behind an ~3k
kernel.
Bingo 3.00 Reference Manual
71
Swap_shell
----------------------------------------------------------------------
Shell to DOS while swapping as above.
Bingo 3.00 Reference Manual
72
Printing
--------
Prior to version 2.01, there were two functions to print, one for
the file and one for a marked block. As of version 2.01, these have
been combined into 'print_file', which prints a block if it is marked,
otherwise it prints the file.
There are a number of options governing printing. You can ask
for line numbers to be printed, page headers (time, page, filename),
and decide whether Bingo should terminate a line with a single
linefeed, or with linefeed/carraige return pairs.
You can also send standalone linefeed or formfeed character, or
send a sequence of ASCII values.
Function List
----------------------------------------------------------------------
Print_file
----------------------------------------------------------------------
Print the current file, or a marked block if there is one, using the
current printer settings, to the current destination. Whenever Bingo
encounters a formfeed character, it will assume that is the start of a
new page, and start the remainder of the line at the left margin.
Send_lf
----------------------------------------------------------------------
Send a line feed character to the destination.
Send_ff
----------------------------------------------------------------------
Send a formfeed character to the destination
Send_sequence
----------------------------------------------------------------------
Send a sequence of character values to the printer; e.g.
12,12,12,12,12
sends a series of 5 ASCII 12's (decimal) to the destination
Bingo 3.00 Reference Manual
73
Searching
---------
There are two search algorithms present in Bingo. One is very
simple and very fast, and part of it is hand-coded in assembler for a
bit more speed yet. For 95% of what you want to do, it is just right.
However, with the advent of version 2.01, a second search
algorithm was added; a regular-expression method. Regular expressions
are a mathematical way to describe strings of text, and are very
powerful. Bingo's algorithm is reliable but not overly speedy; I
suggest you keep this in mind when using it.
If you are not familiar with regular expressions, I am not going
to attempt to explain them to you here. If, however, you have used
them before, I will explain the notations I used in coding Bingo's
algorithm.
To perform a regexp search, use the 'R' modifier on you search
(or replace). If you use this modifier, the string will be
interpreted as follows:
- classes, i.e. [0-9] and 'not' classes, i.e [~0-9]
- occurrences of once, once or none (?), one or more (+), none
or more (*)
- grouping {}
- ORing of {} groups |
- wildcard character .
- match begin and end of lines with ^ and $, respectively
- support for debugging regular expression search
patterns
- along with regular expression searches, you can specify the
replacement in terms of the matched text. '@n' in the
replacement pattern places the text matching the nth group.
'@@' matches the entire matched text. This allows you to do
some nifty text manipulation.
For some simple examples, see below.
It is easy to limit the search area to a specific range by
marking a rangeof text in any of Bingo's three modes. Then use the
'M' modifier to say you wish to match text only within the Marked
area.
The 'C' option in the 'search' function will count the number of
occurrences of the target string in the rest of the search area.
The 'G'lobal option for search and replace operations starts from
the current cursor position, not from the top of the file.
Try the Search & Macro capability -- it is sharp.
Bingo 3.00 Reference Manual
74
Regular Expression Search & Replace Examples
--------------------------------------------
Here are some examples of regular example search and replace.
Search for --> [a-z]+/.
would match any sequence of one or more letters between 'a' and
'z' followed by a single period.
Search for --> help[a-z]+/.
would match a sequence of 'help' followed by one or more letters
then a single period. It would match 'helpoooooo.' and 'helpp.'
but not 'help.'
Search for --> 19{87}|{88}
would match '19' followed by one occurance of either '87' or
'88'.
Search for --> 19{87}*|{88}
would match '19' followed by none or more occurances of '87' or a
single occurance of '88'. Thus it would match '19',
'1987878787', or '1988'.
Search for --> .
matches any single character. (Note: /. would match a an actual
period.)
Search for --> ^[a-z]+
matches a sequence of 1 or more letters, provided it starts a
line.
Search for --> ^[a-z]+$
matches a sequence of 1 or more letters, provided it starts a
line and ends a line.
Search for --> ^[a-z]+/.[a-z]+
basically matches filenames made up of alpha characters, which
are found at the beginning of a line.
Search for --> ^$
matches a blank line.
Search for --> ^.
matches a non-blank line.
These last two allow you to do some neat stuff using
the macro capability, i.e., apply a macro to every
non-blank line.
Bingo 3.00 Reference Manual
75
Search for --> {[a-z]+}{/.}{[a-z]+}
Replace with --> @3.@1
This will match a sequence of one or more letters, followed by a
period, followed by one or more letters (a filename,
essentially). The replace will put the text matching the 3rd
group first, then a period, then the text matching the 1st group.
On a filename, this will have the effect of reversing the order
of the name and the extension, i.e:
filename.txt
would become
txt.filename
since 'filename' would match the first group and 'txt' matches
the third group.
Function List
----------------------------------------------------------------------
Again
----------------------------------------------------------------------
Repeat the last search operation. If none has yet been done, works
just like search. If the last search operation done was a search &
replace, only the search portion is done.
Search
----------------------------------------------------------------------
Search for text. Will ask for the target text, and two modifiers:
A Accent
B Backwards
C Count
D Debug
I Ignore case
M Marked
R Regexp
The 'A' option tells Bingo to highlight the 'found' text until
the next keystroke arrives.
The 'B' modifier will search backwards.
The 'C' option simply counts the number of occurrences.
The 'D' option tells Bingo that, if you also specify regular
expression searching, before searching display Bingo's interpretation
of your regular expression.
The 'I' option tells Bingo to ignore case when searching.
The 'M' option tells Bingo to only matched text *completely*
within marked text.
The 'R' option tells Bingo to interpret the input string as a
regular expression. See the section on searching for more details.
Bingo 3.00 Reference Manual
76
Replace
----------------------------------------------------------------------
Search and replace text. Will ask for target, replacement text, and
three modifiers:
B Backwards
D Debug
G Global Search/Replace
I Ignore Case
M Marked
P Preserve
R Regexp
If Global is selected, Bingo will simply replace all matching
occurrences with the replacement text. If not, Bingo will stop at
each match and ask:
Yes: replace and continue.
No: don't replace, but continue search.
Only: Replace this and stop
Quit: stop, no replacement.
Global: Continue with global replacement
'M' & 'R' & 'A' options work as in the search case.
'P' tells Bingo to preserve the original cursor location and
return to it when done with the replace operation.
'D' is useful for regular expression work. It tells Bingo to
display its conception of the target string (grouping, classes,
occurance, etc).
Search_macro
----------------------------------------------------------------------
Will acted like the 'search' function, but will ask for a key to apply
when found. It will work like the replace function, but instead of
replacing, it will execute the given key. DO NOT use this function
while recording a macro.
Mark_last_found
----------------------------------------------------------------------
His will unmark the file and mark the last found text if you have not
moved.
Leap_forward
----------------------------------------------------------------------
Searches forward for the next occurence of the next key pressed. If
the key is a function key or return, 'leap_forward' will use the
previous target.
Leap_backward
----------------------------------------------------------------------
Searches backward for the next occurence of the next key pressed. If
the key is a function key or return, 'leap_backward' will use the
previous target.
Bingo 3.00 Reference Manual
77
Utilities
---------
Bingo provides large number of utilities to be used to manipulate
text. Some of the functions available can:
- change the case of a block
- strip the high bit from characters in a block
- place tabs within text, and expand tabs within text
- shift blocks a certain number of spaces
- align lines with other lines
- sort blocks, in ascending or descending order, on a
particular column
- fill a vertically-marked block with a specific character
- format a paragraph
- count the number of words over a span of lines
- insert the current time and date into the file
- center text
The big thing with the utilities is: play with them. They allow
you to do some really useful things to your text,particularly when you
are reformatting. Particularly, entab/detab/indent_tab are very
useful when importing files from other systems/editors. You can take
a file with hard tabs in it which assumed a tabsize of 8 characters,
detab it, change the tabsize to 3, entab it, and save it ready for
another editor which demands hard tabs with a tabsize of 3.
Function List
----------------------------------------------------------------------
Entab
----------------------------------------------------------------------
Compresses the linemarked region specified or the entire file by
converting spaces to tabs.
Indent_tab
----------------------------------------------------------------------
Compresses the leading spaces of the linemark region specified or the
entire file by converting into the proper tabs. Rounds to the nearest
tab stop, thus "normalizing" the indention to tab stops.
Detab
----------------------------------------------------------------------
Expands the linemarked region specified or the entire file by
converting tabs to spaces.
Bingo 3.00 Reference Manual
78
Shift_block
----------------------------------------------------------------------
Shifts the specified linemarked region the number of columns
specified. Positive numbers indicate right-shifting, negative
numbers, left-shifting. The character 't' is used to signify tab
widths '-3t' shifts the block left 3 tabwidths.
Lcase_block
----------------------------------------------------------------------
Lowercases the marked region.
Ucase_block
----------------------------------------------------------------------
Uppercases the marked region.
Fcase_block
----------------------------------------------------------------------
Flips the case of the marked region.
Word_count
----------------------------------------------------------------------
Counts the words in the linemarked region, default the whole file. A
word here is defined as non-whitespace and non-punctuation characters,
NOT by the settings of the 'conf_word' function.
Strip_highbit
----------------------------------------------------------------------
Strips the 8th bit in the linemarked region, default the whole file.
Sort_block
----------------------------------------------------------------------
Sorts block, ascending or descending, on a given column.
Reform_para
----------------------------------------------------------------------
Reformats a block of text to conform to the right margin; a paragraph
is defined as text between blank lines. The total amount of text
contained in a single paragraph cannot be larger than 30000
characters.
Repeat
----------------------------------------------------------------------
Repeats a keystroke n times. If n is '*', the function repeats until
a search fails. The function halts repetition on a search failure.
DO NOT use this command while you are recording a macro; you will get
unpredictable results when you replay the macro.
Dup_line
----------------------------------------------------------------------
Duplicates the current line and increments cursor to the next line.
Bingo 3.00 Reference Manual
79
Align
----------------------------------------------------------------------
Slides the linemarked region left or right to match indentation with
the line immediately above the first marked line. If no lines are
marked, the current line is aligned.
Match_delim
----------------------------------------------------------------------
Finds the proper match for a delimiter. Delimiters are configurable
by the 'conf_delims' functions.
Time_stamp
----------------------------------------------------------------------
Inserts the current date and time into the text.
Fill_block
----------------------------------------------------------------------
Fills a vertically marked block with a specified character.
Center_text
----------------------------------------------------------------------
Centers the current non-space text of the current line (or linemarked
block) on its line, relative to the right margin.
Bingo 3.00 Reference Manual
80
Windows
-------
Window_vertical
---------------
Bingo provides the ability to split windows vertically. There
are some restrictions, however. Vertical windows must always exist in
pairs; that is, two windows sharing one status line. They are even
resized together. This is not a large problem, but you should be
aware of it.
Window_one & Window_zoom
------------------------
While window_one and window_zoom superficially perform the same
action, remember that zoom is simply a toggle, while the 'window_one'
function eliminates all windows except the current, growing the
current window to full size.
Function List
----------------------------------------------------------------------
Window_edit
----------------------------------------------------------------------
This function ask for a filename, then splits the window and
essentially performs and edit_file function for the requested
filename.
Bingo 3.00 Reference Manual
81
Window_load
----------------------------------------------------------------------
Works like window_edit, except it forces a reload of the named file.
Window_split
----------------------------------------------------------------------
This simply splits the current window in two and uses the current file
for both.
Window_vertical
----------------------------------------------------------------------
Splits the current window vertically. Windows can only be split so
once.
Window_close
----------------------------------------------------------------------
Closes the current window and expands the above window to use its
space.
Window_zoom
----------------------------------------------------------------------
Toggles the display between zoomed mode. When the display is zoomed,
the current window takes up the entire display, but Bingo 'remembers'
the rest of the windows and will restore them when zoom mode is
toggled again.
Window_one
----------------------------------------------------------------------
This function makes the current window the only window, wiping out all
other windows.
Window_next
----------------------------------------------------------------------
This moves to the next window down, or wraps to the top window if
necessary.
Window_previous
----------------------------------------------------------------------
This moves to the next window up, or wraps to the bottom if necessary.
Window_top
----------------------------------------------------------------------
Jumps to the topmost, leftmost window.
Window_bottom
----------------------------------------------------------------------
Jumps to the bottom-most, rightmost window.
Bingo 3.00 Reference Manual
82
Window_resize
----------------------------------------------------------------------
This allows you to resize the current window (and its left or right
sibling, if it exists) and the window below (and *its* left or right
sibling, if it exists) by 'rubberbanding' the current status line up
and down.
Bingo 3.00 Reference Manual
83
Extra Functions
---------------
Pick & Exec
-----------
This function asks for a function descriptor to execute. The
same function descriptors are used as are used by KEYCFG. If you give
it an unrecognized descriptor, a list of all supported functions are
popped up for your convenience. If you give it substring, such as
'win', all functions descriptors which contain 'win' anywhere will be
shown; in this case the window functions. Tie this to an easy-to-
remember key and all of Bingo's functions are at your fingertips.
This is also useful when you are trying to remember a particular
function descriptor and you don't have the documentation handy.
Quit and Save Status
--------------------
This simply saves the current Bingo status information, copies of
all current files, and exits. When you next start Bingo, it will ask
if you wish to restore Bingo to its previous state. If you say yes,
you will be placed exactly where you left off. If you indicate no,
Bingo will proceed normally, leaving the suspension files in place to
be dealt with the next time Bingo is invoked.
This function is ultra-useful since it allows for easy
interruptions when you are working.
Repeat_last
-----------
This is a handy function. It will execute the most-recently-
executed function again. It won't change what that most-recently-
executed function was.
Box Draw Mode
-------------
This is an enormously useful capability. When the
'toggle_box_draw' function is executed, you will be asked whether you
wish to use single or double line drawing. After you make your
choice, the 4 cursor movement functions will respond differently.
When you move the cursor up via the 'cursor_up' function, the cursor
will move up, but it will trail a line (of the appropriate mode)
behind. Corners and intersections will be handled automatically. The
line characters will be placed into the text as if Bingo was in
overwrite mode.
As of version 3.00, double and single lines will intermix nicely
with no problems. Also, an 'erase' mode has been added to allow you
to move about using the arrow keys erasing text.
Bingo 3.00 Reference Manual
84
Cmd_line
--------
This function gives you a command line entry space on the status
line. You may enter any valid Bingo function. You only need to enter
enough of the function to make it unique; for example, 'swap_ex' is
enough to get you the swap_execute function.
Further, you can pass parameters to the function you enter
directly on the command line, provided the parameters would normally
be entered into a string-entry box. For example,
swap_exec dir/p
entered in response to the cmd_line would directly execute the "dir/p"
command after swapping Bingo out.
Note that this only works for parameters which would normally be
entered in a string-entry box; parameters entered in response to a
Yes/No box would not work.
Function List
----------------------------------------------------------------------
Pick_exec
----------------------------------------------------------------------
This allows you to pick a function descriptor and have it executed.
Quit_and_save_status
----------------------------------------------------------------------
His function saves the current status of Bingo as well as the current
files, so that the next time Bingo is invoked, you will be given the
option to pick up where you left off.
Global
----------------------------------------------------------------------
This allows you to execute any keystroke globally, throughout all the
files in the ring. DO NOT use this function while recording a macro.
When invoked, it asks for a keystroke to execute globally. The
keystroke can invoke a macro, or simple be tied to a function. For
each file in the ring, Bingo will ask if you wish the function to be
executed; your options are the same as they are when doing a search &
replace operation:
Y Yes, do operation, go to next file
N No, don't do operation, but do go to next file
O Yes, do the operation, but abort the global operation
afterwards.
G Yes, do the operation, and do it for all remaining
files without asking.
Q Abort the global operation right now.
Bingo 3.00 Reference Manual
85
Query_quote
----------------------------------------------------------------------
Inserts an integer or sequence of integers as its raw ASCII character.
The decimal values must be comma delimited. This function does NOT
change the cursor position.
Toggle_display
----------------------------------------------------------------------
Toggles the display size between 25 lines and 43/50 lines. Will in
all likelihood screw up the cursor shape, since the scan line counts
will change.
Load_profile
----------------------------------------------------------------------
Loads the profile file of your choice, searching first the current
directory then Bingo's home directory.
Write_profile
----------------------------------------------------------------------
Saves the text settings of the active buffer to the profile file of
your choice in either the current directory or Bingo's home directory.
Settings include:
&ins=1 (insert mode, 1=yes, 0=no)
&tabs=5 (tabsize)
&wrap=1 (wordwrap, 1=yes, 0=no)
&indent=1 (autoindention mode, 1=yes, 0=no)
&cmode=0 (C mode, 0=off, 1=mode 1, etc)
&rmarg=65 (right margin)
&smart=0 (smart tabs, 1=yes, 0=no)
&match=0 (matching mode, 1=yes, 0=no)
&bspace=0 (backspace mode)
&timed=256 (timed backups, range 0 - 32000)
&run=<chess_fname>
See the Chess documentation for more information on the &run
parameter.
Repeat_last
----------------------------------------------------------------------
Repeats the last function executed.
Display_file
----------------------------------------------------------------------
Will popup the named file into a scrollable box, similar to the help
file.
Exec_chess
----------------------------------------------------------------------
This function will execute a single line of Chess code, typically a
function or a function with its arguments.
Bingo 3.00 Reference Manual
86
Bingo 3.00 Reference Manual
87
Chess: The Language
-------------------
Introduction
------------
This section serves as the reference text for the Chess
procedural language used by Bingo. Chess is a simple yet powerful
language with much in common with the C programming language. While
Bingo has been around for a number of years, as it grew more and more
powerful I began to see that a procedural language would be necessary
for users to fully unlock the power of Bingo. And so, in November of
1991 I began looking into interpreter and compiler theory.
Adding a procedural language to an application is not a trivial
undertaking. There are a number of issues which all conflict with
each other: the addition couldn't bloat Bingo beyond measure; the
language couldn't be too trivial to be useful; Bingo had to work as
easily with it as without it.
It was immediately clear that implementing an interpreter was far
easier than a compiler. However, interpreted code is usually far
slower than compiled code. But when I reflected on this, it occurred
to me that most of a subprogram would be calls to Bingo functions,
which would operate very quickly indeed. So an interpreter was indeed
feasible for what I had in mind.
Modeling the interpreter after the C programming language was
also appealing, not just because I am most comfortable programming in
C. I was able to locate several texts which used C as a teaching
interpreter. This made the learning much easier.
By April of 1992, I had a working standalone interpreter,
designed so it would graft easily onto another application, and I had
learned a whole lot about lexical analysis and interpreter theory.
Now all I had to do was graft this onto Bingo! After a lot of design
work, I started implementing it, and within a month it was reasonably
complete. The time since has been spent refining the interpreter,
judiciously adding to the system function library, and testing,
testing, testing!
Bingo 3.00 Reference Manual
88
Things to Possibly Come
-----------------------
Obviously, given the design of Chess, adding more library
functions is in the future. Chess's capabilities have to be kept in
step with Bingo's own growth. However, it is paramount that Chess
stay relatively small. The code for Chess added less than 20k in
total to Bingo's executable and I don't want that to grow unchecked.
This release of Chess is fully functionally, but the code is
currently tuned for functionality, not for speed. Future versions of
Chess will be much more optimized for execution speed.
For specific additions, I expect to quickly add access to BIOS
and DOS interrupts, memory allocation, and several other low-level
functions to augment Chess's current power.
Bingo 3.00 Reference Manual
89
The Body of a Chess Program
---------------------------
A Chess program consists of the following format:
<type> <global_varname1>
...
<type> <global_varnameN>
{
<type> <local_varname1>
...
<type> <local_varnameN>
<statement1>
...
<statementN>
}
<function_name1>
<argtype> <arg1>
...
<argtype> <argN>
{
}
...
<function_nameN>{
<argtype> <arg1>
...
<argtype> <argN>
{
}
The variables declared as <global_varname> are known as global
variables, while the variables declared as <local_varname> are local
variables. Now we will take a look at what comprises these variables
and statements.
Bingo 3.00 Reference Manual
90
Variables and Constants and Comments
------------------------------------
Like most procedural languages, Chess programs are composed of
three basic building blocks, Variables, Constants, and Comments.
Variables are locations which hold information. You can
visualize them as shoeboxes with names. Each of these locations can
hold one of two basic types of information, integers (whole numbers)
or characters (like the letter 'a'). Additionally, Chess uses
'arrays' of variables (groups of 1 or more basic objects) and
'pointers' to basic objects. Arrays and pointers will be discussed in
the next section. Variables which haven't had a value assigned to
them always start out loaded with zeros.
Integers and Characters:
Integer Chess variables are defined like this:
int int_var;
This defines the variable 'int_var' as a Chess integer. Chess integer
variables are represented internally as 4-byte values able to hold
whole-number values in the range of -2147483648 to +2147483647.
Character Chess variables are defined like this:
char c_var;
This defines the variables 'c_var' as a character variable. Chess
character variables are 1-byte values, and the values they can hold
equate to the IBM Extended ASCII character set (see Bingo's ASCII
Chart for a complete listing). These letters have integer
representation as well, for instance, the character 'A' has s decimal
representation of 65.
Variable names can be comprised of letters [a-zA-Z], digits [0-
9], and the underscore character, and they are case sensitive. The
first 7 characters are significant. You can define multiple variables
on the same line:
int int_var1,int_var2;
Constants:
Constants are numeric, character and string literal values.
Numeric constants consist of an optional negative sign [-] and one or
more digits[0-9]. For example:
123 12345 -90 -987654321
are all integer constants.
Character constants consist of a single character, (such as A),
between single quotes ('). For example:
'A' 'a' '1' 'p'
are all character constants.
String constants are the third type of constant Chess supports.
String constants consist of a string of characters enclosed between
double quotes. For example:
"Hello!" "Hi" "12,345 bottles of Beer"
are all string constants.
Bingo 3.00 Reference Manual
91
Comments:
Comments are also very important in Chess; they are strings of
text in a program which are there for we humans to read, and for Chess
to ignore. Comments help the programmer document what he is doing in
the program. Comments begin with the two-letter sequence '/*' and
extend until the end of the current line. For example:
int i; /* define i as an integer
The sequence '/* define i as an integer' is a comment.
Bingo 3.00 Reference Manual
92
Arrays and Pointers
-------------------
Using the two basic building block data types, integer and
character, you can derive two other types of variables. Arrays are
"lists" of like types, and Pointer variables are variables which hold
the address or location of other variables.
Arrays:
To define a character array, use the following:
char var_name[10];
What does this mean? This means, define a variable named 'var_name'
as a list of 10 character blocks. In Chess, you will deal with
'strings' as a data type; a 'string' is a pointer to an array of
characters containing a sequence of characters followed by a zero
byte. Hence the term "zero-terminated" string.
Similarly, an integer array would look like this:
int int_name[20];
This would define 'int_name' as a list of 20 integer blocks.
So what does this mean? Well, with arrays, you can access each
element individually. For example:
int i[20];
i[0]=1;
i[19]=2;
This code fragment shows that you can access each individual element.
Note that when you define an array N elements long, the elements are
numbered 0 to (N-1).
Pointers:
A *pointer* variable is a variable which holds the address of
another variable. For example, in the declaration:
int i[20];
i[5], i[6], and i[8] are all Integer variables; however, 'i' all by
itself is a pointer to the integer array, called an Integer Pointer.
Similarly, in the declaration:
char hello[20];
hello[0], hello[5], and hello[9] are all Character variables. 'hello'
all by itself is a Character Pointer; a variable which holds the
address of a character array.
What do you need pointers for? Well, primarily you use them to
pass arguments back and forth to user and library functions. You will
see a lot of this in the sections on functions, but here are some
examples:
{
char temp[80]; a)
strcpy(temp,"Hello!"); b)
}
This program does 2 things. First, a) declares an array of characters
80 characters long. Then, b) calls the library function 'strcpy'.
'strcpy' is used to copy the contents of one string into another.
Bingo 3.00 Reference Manual
93
Strings in Chess are similar to those in C, as they are character
arrays terminated by a character with a value of zero (0). So, strcpy
will fill in the contents of the array 'temp' with the string
"Hello!". After this function call, temp will look like this:
temp[0]='H'
temp[1]='e'
temp[2]='l'
temp[3]='l'
temp[4]='o'
temp[5]='!'
temp[6]=0
You can do arithmetic on pointers, similar to C, with on caveat.
Look at this example:
{
char temp[80]; a)
strcpy(temp,"Hello!"); b)
msg("%s",temp); c)
temp=temp+1; d)
msg("%s",temp); e)
}
Here we loaded 'temp' with the string "Hello!", just as before, then
we did c), using the libray function msg to display the contents of
'temp, the string "hello!". Then d) increments temp by one byte. Now
when we execute e), temp points one byte further along than it did,
and 'msg' will print out "ello!". Now, temp[0] is 'e', not 'h'.
Similarly, you can increment integer pointers, but there is
something to remember. Look at this example:
{
int temp[80]; a)
temp[0]=1; b)
temp[1]=2; c)
msg("%ld",temp[0]); d)
temp=temp+4; e)
msg("%ld",temp[0]); f)
}
In this code fragment, a) declares am array of integers. In b) and c)
we set the first and second members of the arrays to 1 and 2
respectively. d) using the 'msg' function to print the value of
temp[0], which is 1. e) increments temp by *4* bytes -- this is very
necessary as each integer is 4 bytes wide. Now when we print out
temp[0], we get 2, as temp points to a different place.
Bingo 3.00 Reference Manual
94
Sometimes you will wish to declare a pointer without declaring
any storage to go along with it. You can do this in the following
way:
{
char temp[80]; a)
char p[0]; b)
strcpy(temp,"Hello"); c)
p=temp; d)
msg("%s",p); e)
}
Here, a) declares a character array with space for 80 characters. b)
declares a character array with *no* members; this declares 'p' to be
a pointer to a character buffer. c) copies the string "Hello" into
'temp'. d) assigns 'p' to point at 'temp'. Finally, e) prints the
character buffer pointed to by 'p', the string "Hello".
Bingo 3.00 Reference Manual
95
Operators & Expressions
-----------------------
Operators
Operators are used to do mathematical operations, such as
subtraction and division. There are sixteen operators recognized by
Chess. Assuming 'a' and 'b' are declared as integers, they are:
Operator/Precedence Description
------------------- -----------
unary + (1) When used all by itself before a number
(or variable), denotes the number as a
positive. It is for readability
purposes.
unary - (1) Used to show a number (or variable) is
negative. For example: -a to use the
negative of 'a'.
* (2) Multiplication. For example: a*b
multiples a times b.
/ (2) Division. For example: a/b divides a
by b. Fractions are discarded, so 5/3
is one; 4/3 is also one.
% (2) Modulo or remainder operator. a%b
calculates the remainder of a when
divided by b. So 7%3 is 1, and 8%3 is
2.
+ (3) Addition. a+b adds a and b together.
- (3) Subtraction. a-b subtracts b from a.
< (4) Less than comparison. a<b will evaluate
to 1 if a is less than b, 0 if not.
> (4) Greater than comparison. a>b will
evaluate to 1 if a is greater than b, 0
if it is not.
<= (4) Less than or equal comparison. a<=b
will evaluate to 1 if a is less than or
equal to b, 0 if not.
>= (4) Greater than or equal comparison. a>=b
will evaluate to 1 if a is greater than
or equal to b, 0 if not.
Bingo 3.00 Reference Manual
96
== (4) Equal comparison. a==b evaluates to 1
if a is equal to b, 0 if not.
!= (4) Not equal comparison. a!=b will
evaluate to 1 if a is not equal to b, 0
if it is.
&& (4) Boolean AND operator. a&&b evaluates to
1 if both a and b are non-zero, 0 if
either or both are 0.
|| (4) Boolean OR operator. a||b evaluates to
1 if either a or b, or both, are non-
zero. If both are zero, evaluates to
zero.
= (5) Assignment. a=b sets a to be the value
of b.
The precedence value shows the order in which the operators are
processed. For example:
7*3+5
would evaluate the 7*3 first, since '*' has a precedence higher than
'+', then the 21+5 would be evaluated, giving 26.
Parenthesis can be used to change the order of operations. For
example:
(7*3)+5 evaluates to 26 while
7*(3+5) evaluates to 56.
Expressions
Expressions are comprised of operators, parenthesis, and values.
Operators and parenthesis were discussed above. Values are made up
several different things:
Constants Variables Functions
Constants were discussed previously, as were variables. Functions,
both user and library, always return a value and work like special
variables. For example:
int i;
i=(7+8)*happy(1)+hello(2);
where 'happy' and 'hello' are function names.
Bingo 3.00 Reference Manual
97
Program Statements
------------------
While Chess is very similar to the C programming language, there
are only 5 real statements:
if if-else
while return
break
In addition, a valid expression is a valid statement.
Chess statements must be one to a line of text; you cannot have a
statement (and this includes an expression) span more than one line.
Each statement may be followed on its line by a comment. Each
statement may be followed by a semi-colon (;).
IF
The 'if' statement is used to make simple decisions. Its syntax
is:
if (expression)
<statement>
If the 'expression' evaluates to a non-zero value, the <statement>
will be executed. If 'expression' evaluates to zero, <statement> will
be skipped. So:
int i,j;
i=5;
j=0;
if(i<5)
j=10;
Here, 'j' will be left the value '0', because the comparison 'i<5'
will evaluate to zero.
IF-ELSE
The 'if-else' statement is also used to make simple decisions.
Its syntax is:
if (expression)
<statement1>
else
<statement2>
If the 'expression' evaluates to a non-zero value, <statement1> will
be executed. If 'expression' evaluates to zero, <statement2> will be
executed. So:
int i,j;
i=5;
j=0;
if(i<5)
j=10;
else
j=5;
Here, 'j' will be left the value '5', because the comparison 'i<5'
will evaluate to zero.
Bingo 3.00 Reference Manual
98
WHILE
The 'while' statement is used to repeat the execution of a
statement. The syntax is:
while (expression)
<statement>
Here, for as long as 'expression' evaluates to a non-zero value,
statement will be executed. Before each <statement> is executed,
'expression' will be re-evaluated. So:
int i;
i=0;
while(i<10)
i=i+1;
Here the statement 'i=i+1' will be executed 10 times, and 'i' will be
left with the value '10';
RETURN
The 'return' statement is used to interrupt control flow at the
current level and return a value. It is primarily used to terminate
the execution of a function. For example:
square (n)
int n;
{
return( n * n );
}
This function will takes a single integer as an argument, and returns
its square.
BREAK
The break statement interrupts the execution of the currently
looping WHILE statement. It can only be used within a WHILE loop.
For example:
int i,j;
i=0;
while(1)
if(i==10)
break;
else
i=i+1;
j=0;
This will loop until 'i' is equal to 10, then 'break' out of the loop
and assign zero to 'j'.
Bingo 3.00 Reference Manual
99
Compound Statements
In the above definitions, several statements operate on other
statements. In addition to using a single statement for <statement>,
you can use multiple statements as a single statement via the '{}'
operators. For example:
int i;
i=0;
while(1){
if(i==10)
break;
i=i+1;
}
Here the sequence: { if(i==10) break; i=i+1; } is treated as a single
statement. This allows you to create complex code using the above
simple statements.
Bingo 3.00 Reference Manual
100
User Functions
--------------
Functions are very powerful constructs used to encapsulate common
chunks of functionality. Function always return a value; if they do
not explicitly return a value, they will return zero. They can be
used anywhere in an expression, except to the left of an assignment
operator. *User* functions are function which you, the user, write
for your own benefit.
An Example Chess Program:
int i,j;
square
int n;
{
return(n*n);
}
{
i=1;
while (i<10) {
j=square(i);
msg("%ld*%ld = %ld",i,i,j);
}
}
Declaration
The declaration of a function is as follows:
<fname>
<argtype> arg1;
...
<argtype> argN;
{
<statement1>
...
<statementN>
}
A function may have zero or more arguments declared. If there are no
arguments passed to it, the parentheses are not necessary. If you
look at the example above, you will note several things. First of
all, to *call* the function, you use the syntax:
<function_name> ( arg1 .. argN )
the user function 'square' is called in the above example as:
j=square(i);
This calls the function 'square', passing the argument value of 'i'
into 'square'. This value maps to 'square's first argument, 'n',
which is multiplied by itself and the returned, placed into 'j'.
The number of arguments *passed* into a function must equal the
number of arguments *declared* for the function. For example, you
could not use:
j=square(10,3);
as this tries to use 2 arguments for the function square, which is
declared to use only one.
Bingo 3.00 Reference Manual
101
Arguments are passed into functions by passing their value.
Therefore, a function cannot change the value of an argument. For
instance, in our example above, 'i' is not changed by the use of 'n*n'
in the function. If we had a function:
foo
int n;
{
n=10;
}
and we called it using:
i=5;
foo(i);
'i' would still have a value of 5, since changes to 'n' within the
function 'foo' don't affect the argument 'i'.
So how do you have a function change a variable? To do this, you
must pass a *pointer* to the variable you wish to change. For
example:
foo
int n[0]
{
n[0]=10;
}
and we called it using:
int i[1];
i[0]=4;
foo(i);
Now 'i[0]' will have the value '10'. Here what was passed to 'foo'
was not the value of 'i[0]', but rather the address of the integer
array variable 'i'.
You can do the same thing for strings. Consider:
foo
char s[0];
{
strcpy(s,"Hello");
}
and
char temp[80];
foo(temp);
Here the call to 'foo' passes in the pointer 'temp' to the argument
's'. Then 'foo' uses the system function 'strcpy' to copy in the
string "Hello" to the address 's'. Since 's' maps to 'temp', the
string "Hello" is actually copied into the array 'temp'.
Bingo 3.00 Reference Manual
102
Variable Scope
There is one important concern to keep in mind when using
functions, and that is "variable scope". To illustrate this, look at
this program:
int i;
hello
int n;
{ /* function hello
i=i+n;
}
{ /* main program
int i;
i=0;
while(i<10){
hello(i);
i=i+1;
}
}
Here you will notice the variable 'i' is declared twice, once as a
global value and once as a local value within the main program. So
how does Chess know which one to use? That is where variable scope
comes into play.
The Rules of Scoping
1) If the reference is within the main program and the variable
is declared within the main program, that declaration is used.
2) If the reference is within the main program and the variable
is *not* declared within the main program, the global declaration
is used.
3) If the reference is within a function and the variable is
declared within the function, that declaration is used.
4) If the reference is within a function and the variable is
*not* declared within the function, the global declaration is
used.
So how do these rules apply above? There are two declarations of the
variable 'i'. When 'i' is referenced within the main program, the
main program declaration should be used. These variable 'i' is
separate from the global declaration of 'i' on the first line. Now
when 'i' is referenced within the function 'hello', there is now local
declaration within 'hello', so therefore the global declaration of 'i'
on the first line is used.
Bingo 3.00 Reference Manual
103
Library Functions
-----------------
Library functions are functions which are predefined for you by
Chess. There are many, and they can perform a variety of tasks. See
the "Library Function Reference" section for details. Library
functions can be used just like user functions. If a user function or
variable is defined with the same name as a library function, the user
function or variable will be ignored.
Bingo 3.00 Reference Manual
104
Using Chess From Within Bingo
-----------------------------
Bingo is a powerful text editing engine and Chess is a very
capable procedural language. How do you use the two in concert to
meet your editing needs?
Chess Code in a *.CFG File
--------------------------
Your .CFG file, which KEYCFG turns into a .SET file, is where you
place the Chess functions you wish to be able to execute within a
Bingo editing section. The way this is done is by enclosing a full
chess program, or just a collection of Chess subfunctions in your .CFG
file. The code itself is placed between the two lines:
chess-begin
and
chess-end
each on a line alone. For example:
<key assignments...>
chess-start
char temp[80];
{ /* main program
msg("Bingo has started up!");
getkey();
}
/* this function will run the current file as subprogram.
run_current{
char temp[80],name[20]; /* declare working variables
int i;
b_cmd("modify_save"); /* save current file if dirty
i=ask("file_path",temp) /* get the file's path
ask("file_name",name) /* get the file's name
strcpy(temp+i,name); /* add the name to the path
return(run(temp)); /* run the file and return
}
show_count(n) /* function to count off
int n; /* one parameter
{ /* start function
int i; /* declare an int
i=1; /* start at 1
while (i<=n){ /* until n...
msg("Now at %ld!",i); /* show the value
getkey(); /* wait for a keystroke
i=i+1; /* add 1 to i
}
msg("All done!!!!"); /* all finished!
getkey(); /* wait for a final keystroke
} /* end of the function
chess-end
Bingo 3.00 Reference Manual
105
Here the code in the main body of the program will be executed
when Bingo starts up. The functions 'run_current' and 'show_count' is
defined but not actually used by the startup code.
Attaching Chess Functions to Keystrokes
---------------------------------------
In the above example the function 'run_current' was defined
without being directly used. It is easy to attach this, or any other
defined Chess function, to a specific set of keystrokes. You do this
via the 'interpret' token. For example,
#e macro interpret 'run_current' return
would define the Alt-e keystroke combination to run the function
'run_current' with no arguments. Likewise:
#c macro interpret 'show_count(9)' return
defines the Alt-c combination to invoke the function 'show_count'
function with an argument of 9.
Using the 'macro interpret' mechanism, it is easy to extend
Bingo's functionality. Note: the 'interpret' token is not a normal
Bingo function; it can only be used in a .CFG file.
The Chess Command Line in Bingo
-------------------------------
From within Bingo itself, you can execute an arbitrary Chess
function, with or without arguments, with no problem. The function
used to do this is 'exec_chess'. This function will present a command
line, on which a single Chess function call and its arguments can be
entered. For example, assuming the above code was entered in the .CFG
file and compiled to a .SET file by KEYINFO, this line:
show_count(4);
would invoke the 'show_count' function with an argument of 4.
Attaching Chess Functions to Profile Files
------------------------------------------
Another very powerful way to execute Chess files is through a
profile file. Profile files are discussed in detail in the Bingo
manual under the 'write_profile' function. One of the parameters
which can be set in a profile file is the '&run' parameter. This
parameter is used to name a file containing a Chess program to
execute. The syntax for using this in the profile file is:
&run=c:\test.chs
This instructs Bingo to execute the Chess program contained in
"c:\test.chs" when the profile file is loaded. Remember, profile
files are loaded based on a file's extension.
Bingo 3.00 Reference Manual
106
Running a Chess File on Startup
-------------------------------
Finally, you can tell Bingo to directly execute a Chess program
file using the '-c' command line flag. For example:
be -cc:\test.chs
will run the Chess program file "c:\test.chs" on startup. Note that
you may only run one Chess file on startup, though of course that
program could run as many others as it wanted, using the Chess library
function 'run'.
Order of Execution on Startup
-----------------------------
On startup, both keyboard macros and Chess programs can be
startup automatically. It is important to know the order in which
this will occur. The order is as follows:
1) macro files entered per file via the '-x' flag
2) Chess startup code (main program code from .CFG file)
3) line/column commands per file via the '-p' flag
4) Chess file for each profile file loaded
Debugging Chess Programs
------------------------
In order to make developing Chess programming easier, a
rudimentary tracing function has been provided, accessed through the
'conf_chess_trace' function. When this option is turned on, prior to
execution of each line of Chess code a dialog box will be popped up
showing the line number and the line of code. If you press the
'Enter' key, execution will continue. Pressing Escape will abort the
execution.
Bingo 3.00 Reference Manual
107
Library Function Reference
--------------------------
Ask
----------------------------------------------------------------------
Format: int ask(char what[], ...)
Description: Used to 'ask' the status of various internal
Bingo/Chess variables. Over 50 variables, both text and integer, are
available for your inspection. 'Ask' can be used only to retrieve
values of system variables; it cannot set them.
The calling sequence may differ for each variable, but generally
they are of the format:
i=ask(<ask argument>,[possible extra arguments...])
as in
i=ask("file_new") and
i=ask("file_name",dest)
The first of these checks whether the current file is new (returning 1
for True) while the latter places the current file's name into the
character buffer 'dest', returning the length of the name.
Atoi
----------------------------------------------------------------------
Format: int atoi(char aval[])
Description: Converts the ASCII string representation of a number
into its integer equivalent. For example, suppose the character
buffer test[80] contains the string "12345". Then the call
i=atoi(test)
would return the integer value 12,345 into the integer variable 'i'.
B_cmd
----------------------------------------------------------------------
Format: int b_cmd(char cmd[],...)
Description: Used to execute Bingo commands from within Chess. For
example:
i=b_cmd("down_page");
would attempt to execute the Bingo command 'down_page'. The
True/False return value of 'down_page' will be returned and placed in
the integer variable 'i'. To execute a Bingo command and preload
arguments, make use of the Chess functions 'Key' & 'Str'. For
example:
i=b_cmd("swap_execute",str("dir/p"),key("return"));
would execute the command "dir/p", swapping out to DOS. The return
value would be placed in 'i'. See the sections of 'Str' & 'Key'
respectively for a more in-depth discussion of how they work.
Beep
----------------------------------------------------------------------
Format: int beep(void)
Description: Sounds a beep on the PC speaker, using Bingo's current
frequency and duration settings. Always returns integer 1.
Bingo 3.00 Reference Manual
108
Box_pick
----------------------------------------------------------------------
Format: int box_pick(char title[],int style,int start,
char pick1[], ... char pickN[])
Description: Used to allow the user to pick from a set of options.
Displays a dialog box, with one line for each choice. You may pick
from 3 different styles:
1 --> display only
2 --> display a menubar, with Return selecting the choice
3 --> display a menubar, but also allow the first character of
each choice to select a choice.
The 'start' parameter allows control over where the menubar in
styles 2 & 3 begins, with 0 being the first possibility, 1 the second
possibility, and so on. After the first 3 arguments, any number of
character buffer arguments may be added. These are the possible
choices. For example:
i=box_pick("Test choices",2,0,"Choice 1",Choice 2","Choice 3");
would allow the user to choose from between 3 choices ("Choice 1",
"Choice 2", "Choice 3") using a menubar.
'box_pick' returns the number of the choice made, with 0 being
the first, 1 the second, etc. If the user presses Escape, a -1 is
returned.
Be aware there is an upper limit of about 40 on the number of
arguments you can use. When you need to choose from a larger list of
choices, use the 'pick_file' function.
Get_str
----------------------------------------------------------------------
Format: int box_str(char dest[],char prompt[],int max)
Description: Used to ask for string input from the user via Bingo's
internal dialog box. 'Box_str' will place the string in the 'dest'
character buffer. 'prompt' will be used as a prompt string to tell
the user what you are asking for. 'max' is the maximum number of
characters allowed. 'dest' must have room for 'max' + 1 characters.
For example:
char ret[21];
int i;
ret[0]=0;
i=box_str(ret,"What is your name?",20);
declares a character buffer with room for 21 characters, an integer,
sets the char buffer 'ret' to empty, then asks for the users name, no
longer than 20 characters, placing the result in the buffer 'ret'.
'box_str' returns the character last pressed.
Bingo 3.00 Reference Manual
109
Get_yesno
----------------------------------------------------------------------
Format: int box_yesno(char text[],int default)
Description: Asks the user a yes/no question, allowing only yes, no,
and abort as return values. It displays the text in the character
buffer 'text' and a choice of Yes/No. The default choice is No if the
'default' argument is 0, Yes if the 'default' argument is 1. The user
can press 'y' for Yes, 'n' for No, Return for the current option, or
Escape to abort.
If the user chooses Yes, 'box_yesno' will return 1. If the user
chooses No, it will return 0. If the user hits Escape, 'box_yesno'
will return -1.
Get_char
----------------------------------------------------------------------
Format: int box_char(char text[])
Description: Displays the contents of the character buffer 'text' on
the screen, in a dialog box. It waits for a keystroke, and returns
the ASCII value of the keystroke.
Get_curr_text
----------------------------------------------------------------------
Format: int get_curr_text(char dest[],int len)
Description: Places a copy of 'len' characters, starting from the
current file's current cursor position, into the destination character
buffer 'dest'. If the current line does not contain 'len' characters
past the current cursor position, the return buffer will be padded
with spaces on the right side.
Bingo 3.00 Reference Manual
110
Get_fname
----------------------------------------------------------------------
Format: int get_fname(char dest[], char prompt[],int defok,
int wildok)
Description: Allows you to make use of Bingo's filename validation
and directory list-picking intrinsics. This will prompt the user for
a filename using 'prompt'. If the 'defok' flag is True (non-zero) and
the filename has no extension, Bingo will attempt to use the defined
default extension ('conf_def_ext') and fine a match. If 'wildok' is
False (zero) and wildcard characters are present, 'get_fname' will
present the user with a directory list-picker. Once a selection has
been made, the selection will be placed in the character buffer
'dest'.
'get_fname' returns an integer greater than or equal to zero for
True, less than zero for False.
Get_text
----------------------------------------------------------------------
Format: int get_text(int line,int column,char dest[],int len);
Description: Places a copy of 'len' characters, starting from the
current file's 'line' and 'column' position, into the destination
character buffer 'dest'. If the 'line' does not contain 'len'
characters past the 'column' position, the return buffer will be
padded with spaces on the right side.
Getkey
----------------------------------------------------------------------
Format: int getkey(void)
Description: Waits for a returns the value of a keypress. Whether
the extended keyboard BIOS is utilized is dependent on Bingo's setting
('conf_key_bios'). This value is not simply the 8-bit ASCII value of
the keypress, but the 16-bit scan-code/ASCII combination. The
HEXKEY.COM utility will help in discerning particular key-values.
Itoa
----------------------------------------------------------------------
Format: int itoa(int val,char dest[])
Description: Converts a character buffer representation of a number
into its integer equivalent. For example:
int i;
char temp[20];
strcpy(temp,"12345");
i=atoi(temp);
will leave 'i' with the value 12,345.
Bingo 3.00 Reference Manual
111
Key
----------------------------------------------------------------------
Format: int key(char s[])
Description: This is a specialized function very similar to 'str'.
It is used in conjunction with 'b_cmd' to pass keystrokes to intrinsic
Bingo commands. For example:
b_cmd("window_resize",key("down_arrow"),
key("down_arrow"),key("return"));
would resize the current window to be 2 lines bigger (assuming there
was room, of course). The series of 'key' statements "preload" the
keystrokes shown in the order shown. Allowable keynames currently
include:
return
escape
up_arrow
down_arrow
left_arrow
right_arrow
Note: In the above example, remember that the command would have to be
all on the same line to be properly interpreted by Chess.
Memcpy
----------------------------------------------------------------------
Format: int memcpy(char dest[], char src[], int n)
Description: Copies 'n' bytes of memory from the buffer 'src' to the
buffer 'dest'.
Msg
----------------------------------------------------------------------
Format: int msg(char format[], ...)
Description: Displays a formatted message on the status line. This
message will remain displayed until normal screen processing
redisplays the status line, or until an 'update_display' command is
issued. Formatting follows the same conventions as the 'sformat'
function.
Pick_file
----------------------------------------------------------------------
Format: int pick_file(char fname[],char title[],int style,
int start)
Description: Used as an alternative to the 'box_pick' function when
the number of choices is large. This function will work the same as
'box_pick', except that the choices will be contained in the file
whose name is in the character buffer 'fname'. 'Pick_file' returns
the same values as 'box_pick' does.
Bingo 3.00 Reference Manual
112
Put_char
----------------------------------------------------------------------
Format: int put_char(int val)
Description: Interprets an integer value 'val' exactly as if it was
typed in. For example:
put_char(17408);
will cause Bingo to interpret the keystroke F10. Likewise:
put_char(65)
will cause Bingo to interpret the keystroke 'A'.
Put_text
----------------------------------------------------------------------
Format: int put_text(int insert,int line,int col,char text[]);
Description: This function allows the user to place a string of 0-
terminated text, contained in the character buffer 'text', into the
current file. The text will be placed on line number 'line' at column
'col'. If the 'insert' flag is True (non-zero), any text currently
located there will be pushed to the right. If the 'insert' flag is
False (zero), any text located in that space will be overwritten. For
example:
put_text(1,100,4,"Hi!")
will cause the text string "Hi!" to be inserted on line 100 starting
at column 4.
Put_text_curr
----------------------------------------------------------------------
Format: int put_text_curr(int insert,char text[]);
Description: Function similarly to 'put_text', however the text will
be placed at the urrent cursor position in the current file.
Run
----------------------------------------------------------------------
Format: int run(char fname[])
Description: Allows the user to run another Chess program, contained
in the file named in 'fname'. This file will have access to global
variables defined in the currently executing Chess porgram.
Bingo 3.00 Reference Manual
113
Sformat
----------------------------------------------------------------------
Format: int sformat (char dest[],char str[],...)
Description: Allows formatting of strings using the C language
'printf' conventions. Places the formatted string in 'dest'. While
the full complement of replacements are available, only three basic
primitives will be described here.
%ld integer
%s string
%c character
'Sformat' returns the length of the formatted string. For example:
int i,j;
char dest[80];
char temp[30];
i=sformat(dest,"Hi %s.","Chris");
--> 'dest' contains "Hi Chris."
--> 'i' contains 9
i=sformat(dest,"Hello %s %c.","Chris",'S');
--> 'dest' contains "Hi Chris S."
--> 'i' contains 11
j=99;
strcpy(temp,"Chris");
i=sformat(dest,"%ld red ballons, %s!",j,temp);
--> 'dest' contains "99 red ballons, Chris!"
--> 'i' contains 21
Note: All of Borland TurboC's 'printf' primitives are supported, but
you must rememember a few things. In particular, Chess integers are
4-bytes longs, not normal Turbo C integers. Thus:
i=300000;
sformat(dest,"%d",i);
will not work properly.
Str
----------------------------------------------------------------------
Format: int str(char s[])
Description: This is a specialized function very similar to 'key'.
It is used in conjunction with 'b_cmd' to pass strings of text to
intrinsic Bingo commands. For example:
b_cmd("swap_execute",str("dir /p"),key("return"));
would cause Bingo to swap to DOS and execute the command "dir/p". The
'key("return")' preloads the keystroke 'Retunr' as well.
Bingo 3.00 Reference Manual
114
Strcat
----------------------------------------------------------------------
Format: int strcat(char dest[],char src[])
Description: Conccatenates the contents of one 0-terminate string
onto another:
char temp1[20],temp2[20];
strcpy(temp1,"Hi ");
strcpy(temp2,"Chris!");
strcat(temp1,temp2);
would leave the string "Hi Chris!" in the character buffer 'temp1'
Strcmp
----------------------------------------------------------------------
Format: int strcmp(char s1[],char s2[])
Description: Compares two strings (character buffers). Returns 0 if
the strings match, <0 if string 's1' is less than 's2', and >0 if 's1'
is greater than 's2'. For example:
strcmp("Hello","Hi") returns <0
strcmp("Hello","Alfie") returns >0
strcmp("hello",Hello") returns 0
Strcpy
----------------------------------------------------------------------
Format: int strcpy(char dest[],char src[])
Description: Copies the contents of 'src', a 0-terminated string,
into the character buffer 'dest', including the 0. Always returns 1.
Strlen
----------------------------------------------------------------------
Format: int strlen(char src[])
Description: Returns the length of the 0-terminated string in 'src'.
For example:
char tempo[80];
strcpy(tempo,"Hi!")
i=strlen(tempo);
would leave 'i' with the value of 3.
Strndx
----------------------------------------------------------------------
Format: int strndx(char src[],char c)
Description: Returns the integer offset of the *first* occurance of
'c' in the 0-terminated string 'src'. Return -1 if 'c' is not found.
Position zero (0) is the first character. For example:
strndx("Hello",'o') returns 4
strndx("Hello",'l') returns 2
strndx("Hello",'p') returns -1
Bingo 3.00 Reference Manual
115
Update_display
----------------------------------------------------------------------
Format: int update_display(void)
Description: Refreshes the current window and the command line.
Always returns 1.
Valid_name
----------------------------------------------------------------------
Format: int valid_name(char s[])
Description: Attempts to validate the filename in the character
buffer 's'. Will interpret the ":temp:" and ":home:" identifiers
automatically. Will convert forward slahses to back slashes. Will
attempt to expand 's' to a full directory specification. Always
returns 1.
's' MUST have enough room for the expanded filename; on MS-DOS
filesystems, this equates to roughly 80 characters.
Bingo 3.00 Reference Manual
116
"Ask" Arguments
---------------
Chess's 'ask' library function is the means through which a
program can retrieve information about Bingo's current settings and
status. This section will list each of the 'ask' arguments
recognized, and what they return. Most 'ask' arguments return an
integer, and are used like this:
i=ask("file_autoindent");
True/False arguments such as 'file_autoindent' return 1 for True, 0
for False.
Other types of 'ask' arguments fetch character buffer data, such
as:
char dest[80];
ask("file_name",dest);
would place the current file name in the character buffer 'dest'.
File_autoindent
----------------------------------------------------------------------
Calling Sequence: ask("file_autoindent")
Description: Autoindent setting for current file.
Returns: Integer, 1 if set to True, 0 for False.
File_bspace
----------------------------------------------------------------------
Calling Sequence: ask("file_bspace")
Description: Backspace mode setting for current file.
Returns: Integer 0-3, meaning:
0 --> No Tab Delete
1 --> One Tab Delete
2 --> Delete All
3 --> Rubout
File_changes
----------------------------------------------------------------------
Calling Sequence: ask("file_changes")
Description: Changes to current file since last backup.
Returns: Integer number equal to the number of "change"
events which have hit the current file. Thisis the same number of
changes which the timed backups are triggered from.
File_cmode
----------------------------------------------------------------------
Calling Sequence: ask("file_cmode")
Description: C-Mode setting for the current file.
Returns: Integer describing which type of C-Mode indention is
active for the current file. Types are:
0 None
1 ANSI
2 Classical
Bingo 3.00 Reference Manual
117
File_column
----------------------------------------------------------------------
Calling Sequence: ask("file_column")
Description: Column position in current file.
Returns: Integer denoting the column position of the current
file. 1 is the first column, etc.
File_dialogue
----------------------------------------------------------------------
Calling Sequence: ask("file_dialogue")
Description: Setting of the dialoge box/command-line option.
Returns: Integer value 0 if "boxes" are being used for User
interface, 1 if "command-line" is being used for User interface.
File_dirty
----------------------------------------------------------------------
Calling Sequence: ask("file_dirty")
Description: Has the current file changed since editing began?.
Returns: Integer denoting True (1) or False (0) if the file
has been changed since editing began.
File_id_no
----------------------------------------------------------------------
Calling Sequence: ask("file_id_no")
Description: Unique ID number for current file.
Returns: Integer equivalent to the unique Identification
number of this file. This number if unique for each file edited
during a sesssion. This is useful for creating temporary files
independent of the files name.
File_in_mark
----------------------------------------------------------------------
Calling Sequence: ask("file_in_mark")
Description: Is a block marked in the current file.
Returns: Integer denoting if the block is marked and if so,
what type of block it is. Types are:
0 None
1 Line marking
2 Point marking
3 Vertical marking
File_insmode
----------------------------------------------------------------------
Calling Sequence: ask("file_insmode")
Description: Insert mode on for current file.
Returns: Integer True (1) or False (0) denoting whther the
current file is in Insert mode.
Bingo 3.00 Reference Manual
118
File_line
----------------------------------------------------------------------
Calling Sequence: ask("file_line")
Description: Line number in the current file.
Returns: Integer denoting the line the cursor is on in the
current file. The first line is 1.
File_matching
----------------------------------------------------------------------
Calling Sequence: ask("file_matching")
Description: Matching mode for the current file.
Returns: Integer True (1) or False (0) depending when the
current files Matching mode setting.
File_name
----------------------------------------------------------------------
Calling Sequence: ask("file_name",char dest[])
Description: Filename, with extension, of the current file.
Returns: Into the character buffer 'dest', retrieves the file
name, without the path, of the current file. For example, editing the
file "c:\edit\temp.c":
char temp[80];
ask("file_name",temp);
--> 'temp' now contains "temp.c"
Note: There must be sufficient space in 'dest' for the filename.
File_new
----------------------------------------------------------------------
Calling Sequence: ask("file_new")
Description: Was the current file new when loaded?
Returns: True (1) or False (0) depending on if the current
file was created when it was loaded.
File_number
----------------------------------------------------------------------
Calling Sequence: ask("file_number")
Description: Number of the current file in the ring.
Returns: Integer, ranging from 0 to (number of files - 1),
denoting the number of the current file in the ring. The first file
is 0, the second is 1, etc. This is not to be confused with the
"file_id_no", which is unique for each file edited in the session.
Bingo 3.00 Reference Manual
119
File_path
----------------------------------------------------------------------
Calling Sequence: ask("file_path",char dest[])
Description: Pathname of the current file, ending with backslash.
Returns: Into a character buffer 'dest', the full path
including the drive, of the current file. For example, editing the
file "c:\edit\temp.c":
char temp[80];
ask("file_path",temp);
--> 'temp' contains "c:\edit\"
Note: "file_path" will always end with a backslash, so that the
"file_name" can be concatenated onto the end of the path. 'dest' must
have enough room for the "file_path".
File_rmargin
----------------------------------------------------------------------
Calling Sequence: ask("file_rmargin")
Description: Right margin setting for current file.
Returns: Integer which is the setting of the right margin for
the current file.
File_smart_tabs
----------------------------------------------------------------------
Calling Sequence: ask("file_smart_tabs")
Description: Smart tab setting for current file.
Returns: Integer True (1) or False (0) denoting the setting
of the SmartTabs option for the current file.
File_tabsize
----------------------------------------------------------------------
Calling Sequence: ask("file_tabsize")
Description: Tab size for the current file.
Returns: Integer value of the current file's tab size
setting.
File_timed
----------------------------------------------------------------------
Calling Sequence: ask("file_timed")
Description: Timed backup setting for the current file.
Returns: Integer setting of the timed backup option for the
current file.
File_w_height
----------------------------------------------------------------------
Calling Sequence: ask("file_w_height")
Description: Current window height.
Returns: Integer height, in rows, of the current window.
This does not include the status line.
Bingo 3.00 Reference Manual
120
File_w_left
----------------------------------------------------------------------
Calling Sequence: ask("file_w_left")
Description: Current window left location.
Returns: Integer column upon which the curent windows left
side starts.
File_w_top
----------------------------------------------------------------------
Calling Sequence: ask("file_w_top")
Description: Current window one pos.
Returns: Integer value of the row upon which the current
windows top row sits.
File_w_width
----------------------------------------------------------------------
Calling Sequence: ask("file_w_width")
Description: Width of current window.
Returns: Integer widht, in columns, of the current window.
File_wordwrap
----------------------------------------------------------------------
Calling Sequence: ask("file_wordwrap")
Description: Wordwrap setting of current file.
Returns: Integer True (1) or False (0) setting of the current
files Wrodwrap option.
File_x
----------------------------------------------------------------------
Calling Sequence: ask("file_x")
Description: X location of cursor within the current window.
Returns: Integer X, or column, location of the cursor within
the window, using the window top as row 1, and the window left as
column 1.
File_y
----------------------------------------------------------------------
Calling Sequence: ask("file_y")
Description: Y location of cursor on the current window.
Returns: Integer Y, or row, location of the cursor within the
window, using the window top as row 1, and the window left as column
1.
Sys_autoindent
----------------------------------------------------------------------
Calling Sequence: ask("sys_autoindent")
Description: System autoindent setting.
Returns: Integer default autoindent setting, True (1) or
False (0).
Bingo 3.00 Reference Manual
121
Sys_autostrip
----------------------------------------------------------------------
Calling Sequence: ask("sys_autostrip")
Description: System autostrip setting.
Returns: Integer default high bit stripping setting, True (1)
or False (0).
Sys_autotrail
----------------------------------------------------------------------
Calling Sequence: ask("sys_autotrail")
Description: System autotrail setting.
Returns: Integer default auto trailing space setting, True
(1) or False (0).
Sys_backups
----------------------------------------------------------------------
Calling Sequence: ask("sys_backups",char dest[])
Description: System backup extension.
Returns:
Sys_bounce
----------------------------------------------------------------------
Calling Sequence: ask("sys_bounce")
Description: System cursor bounce setting.
Returns: Integer default bounce cursor setting, True (1) or
False (0).
Sys_bspace
----------------------------------------------------------------------
Calling Sequence: ask("sys_bspace")
Description: System backspacee setting.
Returns: Integer default backspace setting. See the entry
for "file_bspace" for a listing of valid return codes.
Sys_carraige
----------------------------------------------------------------------
Calling Sequence: ask("sys_carraige")
Description: Carraige return setting.
Returns: Integer default carraige-return splits line setting,
True (1) or False (0).
Sys_cmode
----------------------------------------------------------------------
Calling Sequence: ask("sys_cmode")
Description: System C-Mode setting.
Returns: Integer default C-Mode setting; see the entry for
file_cmode for an explanation of return codes.
Bingo 3.00 Reference Manual
122
Sys_cols
----------------------------------------------------------------------
Calling Sequence: ask("sys_cols")
Description: System # columns.
Returns: Integer number of columns on the screen.
Sys_delete
----------------------------------------------------------------------
Calling Sequence: ask("sys_delete")
Description: Delete joins lines setting.
Returns: Integer default setting for the delte-join option,
True (1) or False (0).
Sys_extensions
----------------------------------------------------------------------
Calling Sequence: ask("sys_extensions", int which, char dest[])
Description: Default file extensions.
Returns: The [which] currently defined file extension. For
example:
char temp[80];
ask("sys_extensions",3,temp);
will retrieve the 3rd defined file extension into the character buffer
'dest'. If the extension is not defined, 'dest' will be filled in
with the empty string "".
Sys_fcount
----------------------------------------------------------------------
Calling Sequence: ask("sys_fcount")
Description: Count of files - 1 in the ring.
Returns: Integer number of files currently in the ring, less
one.
Sys_inmacro
----------------------------------------------------------------------
Calling Sequence: ask("sys_inmacro")
Description: Is Bingo currently replaying a macro?
Returns: Integer default sys_inmacro setting, True (1) or
False (0).
Sys_insmode
----------------------------------------------------------------------
Calling Sequence: ask("sys_insmode")
Description: Default insert mode.
Returns: Integer default Insert mode setting, True (1) or
False (0).
Bingo 3.00 Reference Manual
123
Sys_matching
----------------------------------------------------------------------
Calling Sequence: ask("sys_matching")
Description: System matching mode setting.
Returns: Integer default Matching mode setting, True (1) or
False (0).
Sys_mouse
----------------------------------------------------------------------
Calling Sequence: ask("sys_mouse")
Description: Is a mouse available?
Returns: Integer True (1) or False (0), denoting whether the
mouse is available.
Sys_rdefs
----------------------------------------------------------------------
Calling Sequence: ask("sys_rdefs",char dest[])
Description: Replace default string.
Returns: Places in the 'dest' character buffer the current
Replace default string.
Sys_recording
----------------------------------------------------------------------
Calling Sequence: ask("sys_recording")
Description: Is Bingo currently recording a macro?
Returns: True (1) or False (0), depending on whether Bingo is
currently recording a macro.
Sys_rmargin
----------------------------------------------------------------------
Calling Sequence: ask("sys_rmargin")
Description: System right margin setting.
Returns: Integer value of the current default right margin
setting.
Sys_rows
----------------------------------------------------------------------
Calling Sequence: ask("sys_rows")
Description: Number of rows on screen.
Returns: Integer number of rows displayed on the screen.
Sys_sdefs
----------------------------------------------------------------------
Calling Sequence: ask("sys_sdefs",char dest[])
Description: Search defaults.
Returns: Places in the 'dest' character buffer the current
Search default string.
Bingo 3.00 Reference Manual
124
Sys_smart_tabs
----------------------------------------------------------------------
Calling Sequence: ask("sys_smart_tabs")
Description: System smart tab setting.
Returns: Integer default SmartTab setting, True (1) or False
(0).
Sys_tabsize
----------------------------------------------------------------------
Calling Sequence: ask("sys_tabsize")
Description: System tab size.
Returns: Integer default Tab Size setting.
Sys_timed
----------------------------------------------------------------------
Calling Sequence: ask("sys_timed")
Description: System timed backup setting.
Returns: Integer denoting the number of "changes" which can
elapse between autosaves. Zero (0) means no saves will be done.
Sys_word_delim
----------------------------------------------------------------------
Calling Sequence: ask("sys_word_delim",char dest[])
Description: System defined word delimiters.
Returns: Copies into the character buffer 'dest' the string
of characters which are *not* in a word.
Sys_wordwrap
----------------------------------------------------------------------
Calling Sequence: ask("sys_wordwrap")
Description: System wordwrap setting.
Returns: Integer default wordwrap setting, True (1) or False
(0).
Sys_zoom
----------------------------------------------------------------------
Calling Sequence: ask("sys_zoom")
Description: Is the current window zoomed?.
Returns: Integer default zoom window setting, True (1) or
False (0).
Version
----------------------------------------------------------------------
Calling Sequence: ask("version", char dest[])
Description: Current Bingo version.
Returns: Copies into the character buffer 'dest' a zero-
terminated string containing the current Bingo versions. This string
will be at most 20 characters, including the zero.
Bingo 3.00 Reference Manual
125
Ws_size
----------------------------------------------------------------------
Calling Sequence: ask("ws_size")
Description: Interpreter workspace size.
Returns: Integer size of the currently executing Chess
subprogram size, in charcters.
Bingo 3.00 Reference Manual
126
Chess Execution Errors
----------------------
Abort
----------------------------------------------------------------------
This error will be generated when the execution of a Chess program is
interrupted by the user by pressing and holding the Scroll Lock key.
Arguments
----------------------------------------------------------------------
This error will be generated when the number of arguments used to call
a function does not equal the number of arguments declared for the
function.
Bingo Intrinsic
----------------------------------------------------------------------
This error is generated by a call to the 'b_cmd' library function when
the first argument passed to it does not equal a valid Bingo intrinsic
function.
Class
----------------------------------------------------------------------
This error will be generated when a variable which is not an array is
referenced with an array subscript.
Declaration
----------------------------------------------------------------------
This error is generated when a Chess program attempts to reference a
variable which has not been declared.
Exec Interp
----------------------------------------------------------------------
This error will be generated when Bingo lacks memoery to execute the
command line given in the 'Chess_exec' function.
Function Table Overflow
----------------------------------------------------------------------
This will be generated when the number of declared functions exceeds
the size of the function table set using the BOPTS utility program.
Interpretor Parsing
----------------------------------------------------------------------
This is an error generated when the Chess interpreter has encountered
illegal syntax.
Left Brace
----------------------------------------------------------------------
This error is generated when a left brace ('{') is not found when
Chess expects to find one.
Bingo 3.00 Reference Manual
127
Left-Value
----------------------------------------------------------------------
This error is generated when Chess finds that the value on the left
side of an assignment statement is illegal, such as a constant or a
function.
Link
----------------------------------------------------------------------
This error is generated when Chessin unable to resolve all of the
function and variable references in a program.
Range
----------------------------------------------------------------------
This error is generated when you attempt to reference an array element
outside the declared range.
Right Paren
----------------------------------------------------------------------
This error is generated if Chess fails to find matching right
parentheses or right braces.
Stack (Pop)
----------------------------------------------------------------------
This is an internal error indicating a stack error; report these to
the error as soon as possible, along with a copy of the code that
caused it.
Stack (Push)
----------------------------------------------------------------------
This is an internal error indicating a stack error; report these to
the error as soon as possible, along with a copy of the code that
caused it.
Symbol
----------------------------------------------------------------------
This error is generated when Chess cannot find a symbol used as either
a variable or function.
Syntax
----------------------------------------------------------------------
This error is generated when basic Chess syntax rules are broken.
System Call
----------------------------------------------------------------------
This error is generated when a call to one of Chess's library
functions is called without the proper number of arguments.
Bingo 3.00 Reference Manual
128
System Variable
----------------------------------------------------------------------
This error is generated when a call to the 'ask' library function uses
the incorrect number of arguments, or if the 'ask' argument is
unrecognized.
Variable Table Overflow
----------------------------------------------------------------------
This will be generated when the number of declared variables exceeds
the size of the variable table set using the BOPTS utility program.
Bingo 3.00 Reference Manual
129
Some Example Chess Code
-----------------------
This section will have some example Chess code which you may find
useful.
Example #1: Execute the Current File
------------------------------------
This function is also seen elsewhere, but it is so useful it
warrants inclusion again. It first saves the current file if need be,
the builds its full filespec and executes it as Chess program file.
run_current{
char temp[80],name[20]; /* declare working variables
int i;
b_cmd("modify_save"); /* save current file if dirty
i=ask("file_path",temp) /* get the file's path
ask("file_name",name) /* get the file's name
strcpy(temp+i,name); /* add the name to the path
return(run(temp)); /* run the file and return
}
Example #2: Factorials
----------------------
This pair of functions finds the factorials of numbers.
'find_fact' asks the user for a number and calls 'do_fact' to actually
figure it out. 'do_fact' uses the classical recursive method to
calculate the factorial of an integer.
find_fact{
char temp[30];
int i;
if((box_str(temp,"Find factorial of What number?",2)%256)!=27){
/* if the user didn't press escape
i=atoi(temp); /* convert to an integer
i=do_fact(i); /* find its factorial
msg("%s factorial is %ld",temp,i); /* print it out
getkey(); /* wait for a keypress
}
}
do_fact /* this function is a recursive one
int n; /* single parameter
{
if(n<1) /* if illegal, return 0
return(0);
else if(n==1) /* if we are done with recursive call
return(1);
else /* else, recurse another level
return(do_fact(n-1)*n);
}
Bingo 3.00 Reference Manual
130
Example #3: Synchronized Scrolling
----------------------------------
This is a nifty function. Bound to a key, it will automatically
scroll two side-by-side windows down one page together. It uses the
system library function 'ask' to see if there are two windows present,
then uses 'b_cmd' to do the necessary window manipulation. Note how
the return values of the Bingo intrinsics are used to return a status
code of 0 for False, 1 for True. This enables the function to be used
with the 'repeat' function and such, terminating properly when the
function fails.
double_down{
int i; /* declare an integer
if(ask("file_w_width")!=ask("sys_cols")){ /* do we have side
/* by side windows?
if(ask("file_w_left")==1){ /* if the left window...
i=b_cmd("down_page"); /* do both windows
b_cmd("window_next");
i=i+b_cmd("down_page");
b_cmd("window_previous");
}
else{ /* if the right window...
i=b_cmd("down_page"); /* do both windows
b_cmd("window_previous");
i=i+b_cmd("down_page");
b_cmd("window_next");
}
if(i<2) /* did either operation fail?
i=0;
}
else{ /* single window, just do the normaloperation
i=b_cmd("down_page");
}
return(i);
}
Bingo 3.00 Reference Manual
131
License Agreement
-----------------
This section tells you is how to become a registered user once
you decide that you like the program and want to use it on a regular
basis.
Bingo is distributed under the shareware marketing concept; it is
not free software and it has not been released to the public domain.
The documentation, executable images, and all other files distributed
with Bingo are copyrighted.
Shareware is a way of distributing computer software that allows
you to try out a program before you purchase it. Programs distributed
as shareware typically give you some period of time to use the program
and evaluate its usefulness to you. If the program doesn't meet your
needs, you're under no obligation to pay for it. If you do find the
program useful and wish to continue using it on a regular basis, the
shareware program's author usually requests that you pay for the
program by sending him or her a completed registration form and
payment. This is the approach I have taken in making Bingo available
to the public.
If you find Bingo to be a useful addition to your software
library, you're requested to become a registered user by completing
the enclosed registration form and returning it along with the
indicated license/registration fee. I hope that you will agree that
the $40.00 license fee (for the Single Version registration) or $75.00
license fee (for the Lifetime registration) is a small price to pay
for the continued use of the program. It requires a large investment
to develop, market, and support a product of this complexity. Your
support in the form of a license/registration fee will continue to
make good software available at low prices.
Quantity discounts are available to business, government, and
other organizations that wish to use Bingo on multiple computer
systems. Bingo is also available at very special rates to
organizations who wish to use it for promotional purposes. Write the
author for information on using the program this way.
You are granted a limited license to use and examine Bingo on a
trial basis to determine if Bingo is suitable for your needs. If you
find Bingo useful and continue to use it on a regular basis, you
should complete and return the registration form along with the
indicated license/registration fee.
Bingo 3.00 Reference Manual
132
You are encouraged to make copies of Bingo for the trial use of
other individuals and organizations, subject to the following
restrictions:
1) All Bingo distribution files must be copied in unmodified
form.
2) You may not include any other files with the distributed
copy.
You may not distribute Bingo with any other product or
service without written permission of the author.
Bingo may be included on electronic bulletin board systems for
downloading by users of the bulletin board provided the above
restrictions are met.
Bingo and all accompanying materials are provided "as is" without
warranty of any kind. The entire risk of using Bingo is assumed by
you.
The author, Christopher R. S. Schanck, makes no warranty of any
kind, expressed or implied, including but not limited to any
warranties of merchantability and fitness for a particular purpose.
In no event will the author, Christopher R. S. Schanck, be liable
for any damages whatsoever arising out of your use or inability to use
the program.
If you use Bingo on a regular basis, you should complete the
registration form at the end of this document and return it along with
the indicated license/registration fee. Registration gives you the
right to use the software as documented in the license.
A registration fee of $40.00 establishes you as a One-Time
registered user of the current version of Bingo, with the next version
your for free. After that, successive versions must be re-registered.
A registration of $75.00 establishes you as a Lifetime
registrant, and in this situation you are entitled to the next version
of Bingo free. After that, you will be notified of each subsequent
version, and they will be available for a five (5) dollar fee.
When you submit your registration fee, unless you specifically
request otherwise, the author will mail you a copy of the current
version of Bingo and accompanying documentation on disk (3.5" or
5.25") for free. Mailing addresses outside of the continental United
States will need to submit a $15.00 shipping and handling charge.
Bingo 3.00 Reference Manual
133
Registration Form - Bingo 3.00
-------------------------------
Remit to: Christopher R.S. Schanck
PO Box 279
Hanover MD 21076
Bingo 3.00
Disk size, circle one: ( 3.5" / 5.25" / SEND NO DISK )
Registration OPTIONS:
One-Time Registration ............ _____ @ $ 40.00 each $ _____
Lifetime Registration ............ _____ @ $ 75.00 each $ _____
Bingo printed Documentation ...... _____ @ $ 15.00 each $ _____
Subtotal $ _____
Shipping, Outside the Continental U.S. ......... $ 15.00 $ _____
Total (U.S.Funds) $ _____
Name: __________________________________________________________
Company: _______________________________________________________
Address: _______________________________________________________
________________________________________________________________
________________________________________________________________
Day Phone: _______________________________
Eve Phone: _______________________________
Prices subject to change without notice.
Bingo 3.00 Reference Manual
134
Registration Form - Continued
I acquired Bingo 3.00 from
[ ] - Friend
[ ] - Computer Club
Which One? ______________________________________________________
[ ] - Electronic BBS
Which One? ______________________________________________________
Phone #? ________________________________________________________
[ ] - Other
Specify: ________________________________________________________
I would also appreciate any input you would care to give concerning
Bingo. If you have any ideas or comments that would make Bingo a
better program, then please let me know.
Bingo 3.00 Reference Manual
135
Site License Policy
-------------------
This is a license for use of the software within a particular
organization and is not in any way transferable. This permits the use
and copying of the software for as many computers as are contracted
for. Distributing, repackaging, or reselling of the software to third
parties is not allowed. Both Single Version and Lifetime site
licenses are available. A Bingo Site License includes one diskette
and one set of printed documentation. A Bingo site license must be
negotiated directly with the Author.
Pricing Schedule for Single Version Registration:
2 - 10 CPU's $30.00 each CPU
11 - 25 CPU's $24.00 each CPU
26 - 50 CPU's $20.00 each CPU
51 - 100 CPU's $14.00 each CPU
101 - 150 CPU's $11.00 each CPU
151 - 200 CPU's $10.00 each CPU
201+ CPU's $1750.00 one time cost
Pricing Schedule for Lifetime Registration:
2 - 10 CPU's $57.00 each CPU
11 - 25 CPU's $45.00 each CPU
26 - 50 CPU's $38.00 each CPU
51 - 100 CPU's $27.00 each CPU
101 - 150 CPU's $21.00 each CPU
151 - 200 CPU's $19.00 each CPU
201+ CPU's $3250.00 one time cost
Upgrades after the initial free upgrade are 1/25th the total
cost of the site license itself.
Bingo 3.00 Reference Manual
136
The Author
----------
I received my M.S. in Computer Science from The Ohio State
University in March of 1990, and am now employed by a large
engineering/manufacturing firm in the Baltimore area. I was born in a
steel town in Eastern Pennsylvania, and attended The Pennsylvania
State University as an undergraduate, graduating in May of 1988. I
hold a first-degree Black Belt in Tae Kwon Do, and I am an avid reader
of science-fiction, fantasy, military fiction, mythology, and just
about any other occurance of the printed word. Bingo was developed on
an original IBM PC (8088!) through version 2.10d, and since on a
Gateway 2000 386DX/25. Since April '92, Bingo has been developed
while running under IBM's awesome OS/2 2.0 operating system.
Bingo 3.00 Reference Manual
137
Acknowledgements
----------------
There are many I must acknowledge for the inspiration for writing
this program: family, friends, colleagues. In addition, I want to
thank Borland for their excellent Turbo C compiler, which I used to
write Bingo; IBM for making my beloved baby, lo those many years ago;
and all the other folks who wrote software I used to create Bingo. In
particular, thanks to Ralf Brown for his excellent SPAWNO libraries
which I used in this version. Thanks to Gateway computers, for making
my new workhorse. Thanks to all my computer science professors, who
instilled the knowledge to write such an application in me, often
against my will.
Thanks to the members of the Columbus Computer Society (CCS),
particularly the members of the Programmer's SIG, several of whom
served as Beta test people during versions 1.0 to 2.0, putting their
programs In Harm's Way as they tested features.
Thanks to the folks at Home Box Office for running an endless
number of truly bad movies at all hours of the night to keep me
company on some of the more involved programming adventures.
Mucho thanks to my premier beta-tester, Bob Boyken, who was also
the first registrant of version 1.1a. Bob provided me with much
needed time, effort, and ideas, not to mention a help file. His
efforts, both in using Bingo regularly, and in testing things for me
on particular hardware combinations, was nothing short of awesome.
Additional thanks to Rich Thompson, for looking at the earliest
virtual-memory version of 2.10 and not cringing. Or at least not
cringing too much.
Thanks to Jorge, Bradley, Alan, Mike, Pierre, and all the others
for more positive feedback than anyone could hope for.
Thanks to Beaker, Ernie, Cookie, and the rest of the Muppets for
frequent sanity checks, and the Blind Blonde for her support.
Thanks to the BedPiglet, for understanding the time involved in
doing this, and for her smile. Someday I am going to marry this girl.
Nub!
Bingo 3.00 Reference Manual
138
Index
-----
.CFG . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 105-107
abort . . . . . . . . . . . . . . 27-29, 45, 60, 61, 85, 107, 110, 127
abort_all . . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 61
again . . . . . . . . . . . 7, 26, 29, 33, 49, 52, 64, 76, 82, 84, 130
align . . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 78, 80
ascii_table . . . . . . . . . . . . . . . . . . . . . . . . . . 37, 63
ask 7, 27, 28, 30, 31, 36, 61, 73, 76, 77, 81, 84, 85, 105, 108, 109,
117-126, 129, 130, 131
ASP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Association of Shareware Professionals . . . . . . . . . . . . . . 4
atoi . . . . . . . . . . . . . . . . . . . . . . . . . 108, 111, 130
b_cmd . . . . . . . . . . . . . . . 105, 108, 112, 114, 127, 130, 131
back_space . . . . . . . . . . . . . . . . . . . . . . . . . . 49-51
back_tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
backup_all . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
backup_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
BE.EXE . . . . . . . . . . . . . . . . . . . . . . 12-14, 23, 24, 63
beep . . . . . . . . . . . . . . . . . . . . . . . . 29, 30, 42, 108
begin_line . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
begin_of_text . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
block_copy . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 55
block_delete . . . . . . . . . . . . . . . . . . . . . . . . . 53, 55
block_load . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
block_move . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 55
block_save . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
bot_of_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
bottom_of_block . . . . . . . . . . . . . . . . . . . . . . . . . . 69
bottom_of_screen . . . . . . . . . . . . . . . . . . . . . . . . . 69
box_char . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
box_pick . . . . . . . . . . . . . . . . . . . . . . . . . . 109, 112
box_str . . . . . . . . . . . . . . . . . . . . . . . . . . . 109, 130
box_yesno . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
buffer_info . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
carriage . . . . . . . . . . . . . . . . . . . . . . . . . 46, 49, 60
center_line . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
center_text . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
chdir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Chess . 1, 3, 7, 11, 13, 17, 21, 48, 86, 88-94, 96, 98, 101, 103-108,
112-114, 117, 126, 127, 128, 130
choose_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
clean_all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
clean_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
cmd_line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
conf_auto_cut . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
conf_autoindent . . . . . . . . . . . . . . . . . . . . . . . . . . 41
conf_automark . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
conf_backspace . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Bingo 3.00 Reference Manual
139
conf_backups . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
conf_bmarg . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
conf_bounce . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
conf_button_wait . . . . . . . . . . . . . . . . . . . . . . . . . 42
conf_carriage . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
conf_chess_trace . . . . . . . . . . . . . . . . . . . . . . 48, 107
conf_cmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
conf_color . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
conf_cut_stack . . . . . . . . . . . . . . . . . . . . . . . . 43, 58
conf_def_ext . . . . . . . . . . . . . . . . . . . . . . . . 43, 111
conf_delete_join . . . . . . . . . . . . . . . . . . . . . . . 46, 50
conf_delims . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 80
conf_dialogue . . . . . . . . . . . . . . . . . . . . . . . . . 27, 48
conf_eof . . . . . . . . . . . . . . . . . . . . . . . . . . . 41, 60
conf_eol_display . . . . . . . . . . . . . . . . . . . . . . . . . 45
conf_erronly . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
conf_exit_to_pick . . . . . . . . . . . . . . . . . . . . . . . . . 45
conf_insert . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
conf_key_bios . . . . . . . . . . . . . . . . . . . . . . . . 44, 111
conf_kill_size . . . . . . . . . . . . . . . . . . . . . . . . 43, 58
conf_lfs . . . . . . . . . . . . . . . . . . . . . . . . . . . 40, 60
conf_lines_per . . . . . . . . . . . . . . . . . . . . . . . . . . 43
conf_lmarg . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
conf_matching . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
conf_mdelay . . . . . . . . . . . . . . . . . . . . . . . . . . 35, 42
conf_mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
conf_name_save . . . . . . . . . . . . . . . . . . . . . . . . . . 45
conf_prn . . . . . . . . . . . . . . . . . . . . . . . . . 43, 45, 46
conf_prn_eol . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
conf_prn_header . . . . . . . . . . . . . . . . . . . . . . . . . . 46
conf_prn_lineno . . . . . . . . . . . . . . . . . . . . . . . . . . 45
conf_profile . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
conf_rmargin . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
conf_scr_save . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
conf_search . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
conf_shadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
conf_smart_tabs . . . . . . . . . . . . . . . . . . . . . . . . . . 44
conf_sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
conf_stripping . . . . . . . . . . . . . . . . . . . . . . . . . . 41
conf_tabsize . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
conf_timed_backups . . . . . . . . . . . . . . . . . . . . . . . . 46
conf_tmarg . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
conf_trail . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
conf_video_mode . . . . . . . . . . . . . . . . . . . . . . . . . . 43
conf_wild_load . . . . . . . . . . . . . . . . . . . . . . . . . . 46
conf_win_close . . . . . . . . . . . . . . . . . . . . . . . . . . 42
conf_word . . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 79
conf_wordwrap . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
copy 5, 10, 12, 14, 44, 52-56, 58, 61, 63, 93, 102, 110, 111, 128, 133
copy_append . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
cursor_down . . . . . . . . . . . . . . . . . . . . . . . . 34, 35, 68
Bingo 3.00 Reference Manual
140
cursor_left . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
cursor_right . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
cursor_up . . . . . . . . . . . . . . . . . . . . . . . . . . . 68, 84
cut . . . . . . . . . . . . . . . . . . . . . . 43, 44, 49, 51-56, 58
cut_append . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
default_bspace . . . . . . . . . . . . . . . . . . . . . . . . 49, 51
default_del . . . . . . . . . . . . . . . . . . . . . . . . . . 49, 51
define_scrap . . . . . . . . . . . . . . . . . . . . . . . . . 64, 65
del_bol . . . . . . . . . . . . . . . . . . . . . . . . . . 49, 50, 58
del_char . . . . . . . . . . . . . . . . . . . . . . . . . . . 49-51
del_eol . . . . . . . . . . . . . . . . . . . . . . . . . . 49, 50, 58
del_line . . . . . . . . . . . . . . . . . . . . . . . . . 49, 50, 58
del_word_lt . . . . . . . . . . . . . . . . . . . . . . . . . . 49, 51
del_word_rt . . . . . . . . . . . . . . . . . . . . . . . . . . 49, 51
delete_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
detab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 78
display_file . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
down_page . . . . . . . . . . . . . . . . . . . . 34, 35, 67, 108, 131
dup_line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
edit_file . . . . . . . . . . . . . . . . . . . . . . . . . 57, 60, 81
emacs_yank . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 56
end_line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
end_macro . . . . . . . . . . . . . . . . . . . . . . . . . . . 64, 66
entab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1, 78
exec_chess . . . . . . . . . . . . . . . . . . . . . . . 21, 86, 106
exec_command . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
extend_mark . . . . . . . . . . . . . . . . . . . . . . . . . . 52, 54
fcase_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
file . . . 1-3, 7, 11-13, 15-17, 19-24, 28, 30-32, 34, 35, 40-46, 50,
52-55, 57-63, 65, 66-69, 73, 74, 77-79, 81, 82, 85, 86,
105-113, 117-123, 130, 131, 138
file_all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
file_autoindent . . . . . . . . . . . . . . . . . . . . . . . . . 117
file_bspace . . . . . . . . . . . . . . . . . . . . . . . . . 117, 122
file_changes . . . . . . . . . . . . . . . . . . . . . . . . . . 117
file_cmode . . . . . . . . . . . . . . . . . . . . . . . . . 117, 122
file_column . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
file_dirty . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
file_id_no . . . . . . . . . . . . . . . . . . . . . . . . . 118, 119
file_in_mark . . . . . . . . . . . . . . . . . . . . . . . . . . 118
file_insmode . . . . . . . . . . . . . . . . . . . . . . . . . . 118
file_line . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
file_matching . . . . . . . . . . . . . . . . . . . . . . . . . . 119
file_name . . . . . . . . . . . . . . . . 105, 108, 117, 119, 120, 130
file_new . . . . . . . . . . . . . . . . . . . . . . . . . . 108, 119
file_number . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
file_path . . . . . . . . . . . . . . . . . . . . . . . 105, 120, 130
file_rmargin . . . . . . . . . . . . . . . . . . . . . . . . . . 120
file_smart_tabs . . . . . . . . . . . . . . . . . . . . . . . . . 120
file_tabsize . . . . . . . . . . . . . . . . . . . . . . . . . . 120
file_timed . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Bingo 3.00 Reference Manual
141
file_w_height . . . . . . . . . . . . . . . . . . . . . . . . . . 120
file_w_left . . . . . . . . . . . . . . . . . . . . . . . . . 121, 131
file_w_top . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
file_w_width . . . . . . . . . . . . . . . . . . . . . . . . 121, 131
file_wordwrap . . . . . . . . . . . . . . . . . . . . . . . . . . 121
file_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
file_y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
fill_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
get_char . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
get_curr_text . . . . . . . . . . . . . . . . . . . . . . . . . . 110
get_fname . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
get_str . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
get_text . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
get_yesno . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
getkey . . . . . . . . . . . . . . . . . . . . . . . . 105, 111, 130
global . . . . . . . . . . . . . . . 41, 42, 44, 77, 85, 90, 103, 113
help . . . . 1, 2, 4, 8, 12, 29, 34, 36, 58, 63, 75, 86, 92, 111, 138
indent_down . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
indent_tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
indent_up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
info . . . . . . . . . . . . . . . . . . . 5, 29, 36, 45, 46, 55, 63
insert_tab . . . . . . . . . . . . . . . . . . . . . . . . . . 44, 49
itoa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
jump . . . . . . . . . . . . . . . . . . . . . . . . . . . 57, 67-70
jump_mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
key . 1, 12, 13, 17, 19-22, 24, 26-29, 33, 34, 36, 44, 63-66, 77, 84,
105, 107, 108, 111, 112, 114, 127, 131
key_set_load . . . . . . . . . . . . . . . . . . . . . . . . . 17, 66
key_set_save . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
KEYCFG . . . . . . . . . . . . . . 12, 17, 20-22, 33, 57, 65, 84, 105
KEYINFO . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 106
last_error . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
lcase_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
leap_backward . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
leap_forward . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
line_mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
load_file . . . . . . . . . . . . . . . . . . . . . . . . . 20, 21, 60
load_profile . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
look_buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
main_menu . . . . . . . . . . . . . . . . . . . . . . . . . . . 26, 63
mark_last_found . . . . . . . . . . . . . . . . . . . . . . . . . . 77
mark_word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
match_delim . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 80
memcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
modify_save . . . . . . . . . . . . . . . . . . . 20, 60, 61, 105, 130
modify_save_all . . . . . . . . . . . . . . . . . . . . . . . . 20, 61
Mouse . . . . . . . . . . 1, 2, 17, 19, 21, 26, 33-37, 42, 45, 69, 124
mouse_scroll . . . . . . . . . . . . . . . . . . . . . . . 2, 34, 69
msg . . . . . . . . . . . . . . . . . . . . 94, 95, 101, 105, 112, 130
name_buffer . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 55
new_line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Bingo 3.00 Reference Manual
142
next_error . . . . . . . . . . . . . . . . . . . . . . . . 20, 57, 59
next_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
next_word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
onekey_def . . . . . . . . . . . . . . . . . . . . . . . . . . 64, 65
paste . . . . . . . . . . . . . . . . . 27, 43, 52, 53, 55, 56, 58, 59
paste_kill . . . . . . . . . . . . . . . . . . . . . . 53, 56, 58, 59
paste_replace . . . . . . . . . . . . . . . . . . . . . . . . . 52, 55
pick_exec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
pick_file . . . . . . . . . . . . . . . . . . . . . . . . . . 109, 112
place_mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
point_mark . . . . . . . . . . . . . . . . . . . . . . . . . . 34, 53
prev_error . . . . . . . . . . . . . . . . . . . . . . . . . . 57, 59
prev_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
prev_word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
print_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
put_char . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
put_text . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
put_text_curr . . . . . . . . . . . . . . . . . . . . . . . . . . 113
query_quote . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
quit . . . . . . . . . . . . . . . . . 28, 38, 45, 60, 61, 77, 84, 85
quit_all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
quit_and_save_status . . . . . . . . . . . . . . . . . . . . . 38, 85
reform_para . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
rename_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
repeat . . . . . . . . . . . . . . 1, 2, 64, 76, 79, 84, 86, 99, 131
repeat_last . . . . . . . . . . . . . . . . . . . . . . . . . 84, 86
replace . . . . . . . . . . . . . 1, 2, 20, 41, 52, 55, 74-77, 85, 124
report_bsize . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
restore_line . . . . . . . . . . . . . . . . . . . . . . . . . 58, 59
rotate_kill . . . . . . . . . . . . . . . . . . . . . . . . . . 58, 59
run . . . . . . . 3, 12, 13, 21, 23, 24, 38, 66, 86, 105-107, 113, 130
run_macro_file . . . . . . . . . . . . . . . . . . . . . . . . . . 66
save_all . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 61
save_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
save_settings . . . . . . . . . . . . . . . . . . . . . . . . . 24, 40
scrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
scroll_down . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
scroll_left . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
scroll_right . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
scroll_up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
search . . . . . . . . . . . . . 1, 2, 20, 30, 41, 74-77, 79, 85, 124
search_macro . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
send_ff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
send_lf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
send_sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
setup_err_parse . . . . . . . . . . . . . . . . . . . . . . 20, 57, 59
sformat . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71, 72
shift_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
show_marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
single_key_load . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Bingo 3.00 Reference Manual
143
single_key_save . . . . . . . . . . . . . . . . . . . . . . . . 65, 66
snap_to_mouse_xy . . . . . . . . . . . . . . . . . . . . . . . 34, 69
sort_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
str . . . . . . . . . . . . . . . . . . . . . 108, 109, 112, 114, 130
strcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
strcmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
strcpy . . . . . . . . . . . . . 93-95, 102, 105, 111, 114, 115, 130
strip_highbit . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
strlen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
strndx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
swap_buf_and_block . . . . . . . . . . . . . . . . . . . . . . . . 55
swap_execute . . . . . . . . . . . . . . . . . . 20, 71, 85, 108, 114
swap_shell . . . . . . . . . . . . . . . . . . . . . . . . . . 71, 72
switch_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
sys_autoindent . . . . . . . . . . . . . . . . . . . . . . . . . 121
sys_autostrip . . . . . . . . . . . . . . . . . . . . . . . . . . 122
sys_autotrail . . . . . . . . . . . . . . . . . . . . . . . . . . 122
sys_backups . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
sys_bounce . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
sys_bspace . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
sys_carraige . . . . . . . . . . . . . . . . . . . . . . . . . . 122
sys_cmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
sys_cols . . . . . . . . . . . . . . . . . . . . . . . . . . 123, 131
sys_delete . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
sys_extensions . . . . . . . . . . . . . . . . . . . . . . . . . 123
sys_fcount . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
sys_inmacro . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
sys_insmode . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
sys_matching . . . . . . . . . . . . . . . . . . . . . . . . . . 124
sys_mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
sys_rdefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
sys_recording . . . . . . . . . . . . . . . . . . . . . . . . . . 124
sys_rmargin . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
sys_rows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
sys_sdefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
sys_smart_tabs . . . . . . . . . . . . . . . . . . . . . . . . . 125
sys_tabsize . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
sys_timed . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
sys_word_delim . . . . . . . . . . . . . . . . . . . . . . . . . 125
sys_wordwrap . . . . . . . . . . . . . . . . . . . . . . . . . . 125
sys_zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
threekey_def . . . . . . . . . . . . . . . . . . . . . . . . . 64, 65
time_stamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
toggle_autoindent . . . . . . . . . . . . . . . . . . . . . . . . . 50
toggle_box_draw . . . . . . . . . . . . . . . . . . . . . . . . . . 84
toggle_cmode . . . . . . . . . . . . . . . . . . . . . . . . . 40, 50
toggle_display . . . . . . . . . . . . . . . . . . . . . . . . . . 86
toggle_ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
toggle_wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
top_of_block . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
top_of_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Bingo 3.00 Reference Manual
144
top_of_screen . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
twokey_def . . . . . . . . . . . . . . . . . . . . . . . . . . 64, 65
ucase_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
undefine_key . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
unkill . . . . . . . . . . . . . . . . . . . . . . 49, 53, 56, 58, 59
unmark . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54, 77
up_page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
update_display . . . . . . . . . . . . . . . . . . . . . . . 112, 116
valid_name . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
version . 1-7, 10, 15, 16, 20, 24, 31, 40, 42, 46, 57, 60, 63, 71, 73,
74, 84, 125, 132, 133, 136-138
version_info . . . . . . . . . . . . . . . . . . . . . . . . . 5, 63
vertical_mark . . . . . . . . . . . . . . . . . . . . . . . . . . 54
window_bottom . . . . . . . . . . . . . . . . . . . . . . . . . 20, 82
window_close . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
window_edit . . . . . . . . . . . . . . . . . . . . . . . . . . 81, 82
window_load . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
window_next . . . . . . . . . . . . . . . . . . . . . . . . . 82, 131
window_one . . . . . . . . . . . . . . . . . . . . . . . . 20, 81, 82
window_previous . . . . . . . . . . . . . . . . . . . . . 20, 82, 131
window_resize . . . . . . . . . . . . . . . . . . . . . . 20, 83, 112
window_split . . . . . . . . . . . . . . . . . . . . . . . . . 20, 82
window_top . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
window_vertical . . . . . . . . . . . . . . . . . . . . . . . . 81, 82
window_zoom . . . . . . . . . . . . . . . . . . . . . . . . . . 81, 82
word_count . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
write_profile . . . . . . . . . . . . . . . . . . . . . . . . 86, 106
ws_size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
zap_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Bingo 3.00 Reference Manual
145